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
Issue with Canadian French ordinal #3375
Comments
taken from http://www.academie-francaise.fr/abreviations-des-adjectifs-numeraux it seems like the issue is the also see #2414, where the decision to make fr-ca and fr different |
I noticed this issue too, and would like to prepare a PR to fix it. In this thread and all previous about the same subject (like #2414 mentioned by @sly7-7), there is a confusion about what are the rules to write an ordinal in French in general without any context, and when to write an ordinal in the specific context of the day of the month. In moment library, the When speaking or writing dates in English, both cardinal figures (July 4, format When speaking or writing dates in French, there is no choice, the rule is always the same: use ordinal for day 1 (suffix "er", format There is currently a hack in the 'fr' locale, where This should be fixed. Use "e" suffix for numbers 2 and above, like mentioned in the link to Académie Française (authority for French rules) by @sly7-7 in the previous message. Now, we need a way to express that long date formats in French need ordinal for day 1 and cardinal for other days. There is currently no mechanism to achieve this without adding some JavaScript code. I see 2 solutions:
Please advise what is your preferred solution. Can you think about another one too? (Adding to the discussion authors of the fr locales: @jfroffice @gaspard @jonbca ) Edit: Updated name of new token idea from |
Thanks for notifying. I think solution (2) is fine as long as, like you said, it resolves to Do when nothing special is done. I think calling it "Dom", making it clear what it is "Day of month" or "Day ordinal for month" is better then DL because everything is "localized" so the "L" does not add meaning... |
I tried to implement 1., but abandoned. Is possible but requires more work than expected. The parsing code expects fixed formats, and allowing functions for the date formats (instead of fixed strings) incurs more changes than I can afford now. I liked that solution, because I think semantically this issue is better handled in functions within the French locale code, rather than at a global scope. About 2., in my opinion |
Can a team member from moment confirm option 2 is OK (add a new token for Localized Day of month), before I start coding it ? Or feel free to claim this work. Thank you. |
Moment.js will not take more substantial changes to its codebase. it seems like @fbonzon 's changes require a lot of work, so I don't think we should proceed. |
We say EDIT: This has been fixed in |
Hi,
i know only small portion of people would use French Canadian, such as Quebec, but found a bug in ordinal.
in fr.js
but in fr-ca.js,
Ordinal should be same as French, which is 'er' only after number 1.
Thanks
The text was updated successfully, but these errors were encountered: