-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Date filter am/pm case #8763
Comments
Would you like to submit a PR for this? :D |
Use uppercase for AM/PM in date filter fixes angular#8763
@btford This information is picked from the CLDR that
I am not sure what are the document issues, keeping this issue open to get more information on this last part |
The documentation issues are the ones fixed in #8780 above, i.e. that all examples show lowercase am/pm whereas the actual format is uppercase. |
Use uppercase for AM/PM in date filter fixes #8763
Thanks @SekibOmazic for actually doing it :-) |
You can use For example: Although I agree with you that |
It is also possible to inject and modify $locale service: $locale.DATETIME_FORMATS.AMPMS = ['am', 'pm']; |
The current documentation for the date filter is inconsistent about the case of the 'a' AM/PM format - the output is uppercase, but the docs mostly show lowercase, which is misleading. Other than fixing the docs, it would be great to actually support the two different formatting options, e.g. 'a' for uppercase and 'A' for lowercase (the inverse would be more intuitive, but 'a' is already used for uppercase, so for backward compatibility's sake... or just use a different letter for lowercase).
The text was updated successfully, but these errors were encountered: