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
Hi!
When I tried to use formatDistance (or any other format function for that reason), it always seems to abbreviate numbers to "written numbers" (for example twelve instead of 12) in Norwegian. I cannot replicate the same issue in any other language I've tried, and I'm not really aware of this as a grammatical rule in the Norwegian language (Norwegian is my first language). Even so, it should be possible to at the very least to have this as an option - as it unfortunately renders the formatting part useless in my current project.
Hey! This is definitely not expected behavior. It seems that original author overdid the distance formatting, and we didn't notice it. It sounds cool to have the ability to display numbers as words, but given that other locales don't have it, adding an option that enables it would be a lot of work. So please, open a PR that will make Norweigan locale consistent with others. Thank you!
…closes#2469)
Changed: Made Norwegian `formatDuration` consistent with other locales by using numeric representation instead of written.
Co-authored-by: Lucas Silva <lucas.silva@codeminer42.com>
tan75
pushed a commit
to janziemba/date-fns
that referenced
this issue
Dec 27, 2021
…ns#2631) (closesdate-fns#2469)
Changed: Made Norwegian `formatDuration` consistent with other locales by using numeric representation instead of written.
Co-authored-by: Lucas Silva <lucas.silva@codeminer42.com>
Hi!
When I tried to use
formatDistance
(or any other format function for that reason), it always seems to abbreviate numbers to "written numbers" (for example twelve instead of 12) in Norwegian. I cannot replicate the same issue in any other language I've tried, and I'm not really aware of this as a grammatical rule in the Norwegian language (Norwegian is my first language). Even so, it should be possible to at the very least to have this as an option - as it unfortunately renders the formatting part useless in my current project.Here's a link to the locale file with the abbreviation array in question.
To make life simpler I've also made a CodeSandbox which illustrates the issue in Norwegian compared to a few other languages.
If this isn't desired behavior I can certainly look into the issue and submit a PR 😸
Thanks for developing and maintaining a great library. It save everybody a bunch of time and frustration ❤️
The text was updated successfully, but these errors were encountered: