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
[locale] Extend cs locale with name of the months in genitive #4771
Conversation
Travis failed on locale/ka.js - which was untouched by this PR. |
I haven't kept up with how monthsStrict works these days. Is the inflected version automatically used after an ord date (like "1. cervna")? I feel like we should add a test case for the
I'm okay with this as long as we add a comment to the source file why this workaround is necessary. |
Ah right makes sense. I'm just wondering whether the functionality should be symmetric; if we can parse a specific format, we should be able to print ( |
Yes, it does make sense. But unfortunately I am unable to dedicate more time to design and implement this. Any volunteers? |
imho the impact of having function symmetric is not that big. Additionally, it makes sense to make this available also for the other languages. And it is possible that in various languages this 'genitive-case' is oversimplifaction. |
The thing I don't know is how would you switch between the 2 forms - new setting? Where? On the other hand if someone needs that then (s)he can just simply overload locale definition using: moment.updateLocale('cs', {
months : 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split('_')
}); You could also introduce new locale variant but still - I don't think it is worth the effort. |
@saxicek what's the status of this? looks like you have approval. Also, are there changes that break existing users of this locale? |
Yes. I think those involved in the discussion are ok with the solution. We were waiting for #4762 to pass CI tests. |
In Czech, it is possible to use also declined form of the month name instead of the nominative case.
This commit adds those declined names of the months.
@radekdostal @marxsk @petrbela - please verify this patch as locales have to be verified by native speakers.
This PR is meant to replace solution suggested in #4765 (and agreed with @marxsk in #4765 (comment))
Discussion:
Pro of this solution is that is it easier to understand because plain regexes or their arrays are used instead of anonymous function.
Con is that "červenec" must precede "červen" in the
monthsRegex
andmonthsStrictRegex
to match properly.