-
Notifications
You must be signed in to change notification settings - Fork 721
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 format token for lowercased meridiem am/pm #224
Comments
There's no support for it in the Intl API, so I wouldn't be able to internationalize it. It's plausible that just lower casing whatever it produces would work, but I'd need to be convinced that's really legit across locales. |
I wonder if it would be better to use |
Have you considered just changing AM/PM to a.m./p.m. (lowercase with dots) which would distinguish this element from a timezone, e.g. 1:30 p.m. PST can't be confused with 13:30 PST |
@networkimprov We could do that in the sense that we have hardcoded US English strings so we can override the Intl formatter in most cases and just decide to do it our own way. I'm loath to do that though:
Those can all be summarized as "yes, we can sort of do this, but it's better to be consistent with the Intl formatter". So I don't think that's going to happen. If the Intl formatter provided, like, a Note that if you're using |
OK, thanks for the detailed breakdown! |
I *know* that this solution is clunky, but please see this luxon issue: moment/luxon#224 (tldr: luxon does not support lowercase AM/PM) ...and this moment issue: moment/moment#580 I opted for a version of the suggested code in moment #580, with a ternary operator for the meridiem since luxon does not support a lowercase version.
Right now we only have
a
format token forAM/PM
. I think it is very common to use lowercased meridiemam/pm
. It will be great if you add a new token foram/pm
. Thanks.The text was updated successfully, but these errors were encountered: