iamkun / dayjs

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
https://day.js.org
MIT License
47k stars 2.3k forks source link

monthShort for German locale is not accurate, format MMMM and MMM lead to same result #2354

Open CreeTar opened 1 year ago

CreeTar commented 1 year ago

Describe the bug In German it is common as in English to abbreviate months with three-letters. However in the given locale, the short months are not abbreviated at all, that is inconsistent with the other months and also inconsistent with the English locale.

M = single-digit if possible MM = always 2 digits MMM = three letters for current month's abbreviation MMMM = full month's name

https://codesandbox.io/s/day-js-forked-s8q85p

with the current implementation, there is no difference between MMM and MMMM

Expected behavior MMM will show Jun for Juni, Jul for Juli, Mrz for März and so on. This is also the behaviour Microsoft Excel is showing when formatting a cell with MMM, always three-letters abbreviations: Jan Feb Mrz Apr Mai Jun Jul Aug Sep Okt Nov Dez

Information

raffidil commented 3 months ago

Related PR: #2706