You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem stems from the fact that CustomPareFormat tries to implement some kind of a 'meridiemParse' function that uses the 'meridiem' function of the locale file to find out which hour values are considered 'am' and 'pm'. This function supposes that the 'meridiem' function returns the string for 'pm' for anything after '12' and the string for 'am' for hours '12' and before.
But some locales consider noon as 'pm' among them 'ko'.
If we look to the details of meridiem then we will find that noon / midnight is a very problematic case (and that the chinese locales use more verbs for time ranges, not only 'am' and 'pm'). Details can be found e.g. in wikipdia.
The question is, if we need some kind of 'meridiemParse' function like moment does. @iamkun any opinion on this? I think this would not be too problematic.
Describe the bug
Parsing localized time string including meridiem with format 'a hh:mm' ignores meridiem.
In Korean, "am" is "오전" and "pm" is "오후". There is no uppercase/lowercase in Korean.
However, dayjs customParseFormat doesn't recognize the meridiem and only returns hours in am.
Expected behavior
A clear and concise description of what you expected to happen.
$ node index.js Assertion failed: pm.hour() === 22
The second assert should be passed, but it fails because it returns the hour as 10.
Information
The text was updated successfully, but these errors were encountered: