dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

Fix issue #1656 - error parsing 'MMM' and 'MMMM' in curstomParseFormat plugin

Open BePo65 opened this issue 3 years ago • 4 comments

In the function that translates a (short or long) month name to the corresponding month number there is an error concerning the modulo function: (matchIndex % 12) || matchIndex translates a number from 1..12 to 1..12 and 13..23 to 1..11; but 24 gets translated to 24, For example in the russian locale, december gets translated to a month number of 24 (but should be 12).

The updated formula ((matchIndex - 1) % 12) + 1 translates any index to 1..12 (i.e. legal month names).

BePo65 avatar May 26 '22 17:05 BePo65

Hi @BePo65, when can we expect to merge this PR?

cinic avatar Dec 01 '22 10:12 cinic

I believe that at the moment @iamkun is heavily engaged in his projects - so I am afraid it will still take a while until we see this pr reviewed.
And unluckily I don't see how to help him. Perhaps we need more reviewers 😄

BePo65 avatar Dec 02 '22 06:12 BePo65

Hello, @BePo65 @iamkun can we expect any update on this PR? 👴🏼

cinic avatar May 23 '24 18:05 cinic

It's @iamkun turn.

BePo65 avatar May 23 '24 19:05 BePo65