-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix French date month ordinal #3659
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
Conversation
|
Thoughts on my comment in this similar PR? It might be less common, but I can see a valid use case (invoicing?) that would use day ordinals without months (ex: 5e du mois / 5e jour du mois). The date-fns v1 implementation was only applying this behavior if day ordinals were followed by |
|
Also, there used to be unit tests for this edge case in v1. It might be a good idea to bring this back because the locale snapshot tests sometimes don't surface these more subtle issues. date-fns/src/locale/fr/build_format_locale/test.js Lines 299 to 328 in 67a0329
|
|
@fturmel indeed we might want to handle this edge case, but it's much less common so I think it's a good first fix anyway? And those edge cases are better written using an intl library instead of this one. The current version does not allow to handle this easily anyway... Also, I added the test snapshots you suggested :) |
|
Not my call to make, but the concern I want to raise (especially to the non-speaking core team) is the trade-off between breaking valid edge cases that are probably already out there in favor of fixing the more common use case. I might poke around the |
|
As mentioned in this PR, this change introduce a regression which is not expected #1391 (comment) |
Fixes #1391.