Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nb_NO locale #291

Merged
merged 2 commits into from Dec 6, 2016
Merged

Add nb_NO locale #291

merged 2 commits into from Dec 6, 2016

Conversation

hanse
Copy link
Member

@hanse hanse commented Dec 6, 2016

Add support for Norwegian Bokmål (nb_NO).

The first day of a week is Monday. Do I need to specify that somewhere?

Closes #290.

@leshakoss
Copy link
Contributor

@hanse Thank you!

The first day of a week is Monday. Do I need to specify that somewhere?

No, right now weekStartsOn isn't a part of locales but a separate option specified in functions independently (it may change in future major versions)

@leshakoss
Copy link
Contributor

leshakoss commented Dec 6, 2016

@hanse please rename it into just nb. We generally use two letter codes for languages (except in cases when the second part of four letter code refers to a variant of macrolanguage)

@hanse
Copy link
Member Author

hanse commented Dec 6, 2016

Okay, done!

@leshakoss leshakoss merged commit 103442c into date-fns:master Dec 6, 2016
@leshakoss
Copy link
Contributor

@hanse thank you for your contribution! 🇳🇴 Norwegian Bokmål locale was released with 1.14.0 and also was broken by me 😅 and fixed in 1.14.1. (diff overall: v1.13.0...v1.14.1)

@stianlp
Copy link

stianlp commented Jan 25, 2019

Looks like there is an issue with the build. In https://github.com/date-fns/date-fns/blob/master/src/locale/nb/_lib/localize/index.js weekdays abbreviated is ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'].

When I install date-fns, this is what I find in node_modules. var weekdays3char = ['sø.', 'ma.', 'ti.', 'on.', 'to.', 'fr.', 'lø.']. I assume weekdays3char should be the same list as dayValues abbreviated?

So doing format(date, 'ddd D. MMM', { locale: nb });, ends up being "Ma. 28. jan", not "Man 28. jan".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants