purescript-contrib / purescript-formatters

Formatting and printing for numeric and date/time/interval values
Apache License 2.0
41 stars 29 forks source link

Support lower-case meridiem #67

Open fsoikin opened 3 years ago

fsoikin commented 3 years ago

Description of the change Adds support for lower-case meridiem (i.e. "am" or "pm" instead of "AM" and "PM") via a new FormatterCommand constructor MeridiemLowerCase and its string representation "A".

This is something our designers really want to have, and so far we have been doing a combination of ignoring the designers' requests and/or separately lowercasing the resulting string. The latter is not always possible, e.g. in case the string contains month or week day name, which can be worked around by formatting those separately and concatenating, but this kind of defeats the point of using a formatter library in the first place.

The print-parse-print loop doesn't work - it will lose the lower-case variant upon parsing, - but then it never did work in this respect, so no harm.


Checklist: