Abbreviated month name is not working with SL locale
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/iamkun/dayjs/blob/cb4f74633b3020d6dbf19548c8cb13613dafca18/src/locale/sl.js#L10
I tried using SL locale with CustomParseFormat and the "MMM" format is not working. I figured out that the problem is that there are dots after the abbrevations in locale file.
The foillowing code fixes the problem.
```js
dayjs.updateLocale('sl', {
monthsShort: 'jan_feb_mar_apr_maj_jun_jul_avg_sep_okt_nov_dec'.split('_'),
});
```
There are some languages that have these dots in weekdays and months, but others don't. What's the proper format officially? Was the format changed at some point in the past, but not all locale files were properly updated?
Contributor guide
Research direction
Start with src/locale/sl.js at the referenced monthsShort definition and reproduce the Slovenian MMM parsing failure with CustomParseFormat. Compare the abbreviated month values with the expected locale behavior and confirm the appropriate punctuation convention. Done means Slovenian abbreviated month names parse correctly with MMM without requiring updateLocale.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100