rluiten/elm-date-extra

AM/PM is wrong for 12 noon

Closed this issue · 1 comments

12 noon in the US is PM but the formatter reports it as AM.

This time 1456506529321 is formatted as 26 Feb 2016 12:08:49 AM with format:

%-d %b %Y %-H:%M:%S %p

but it should be PM

Thanks for the report. Somehow I did not have a test covering that, I though I had one.

I cant use your test time to verify without knowing which timezone offset you are running in, however I reproduced the faulty behavior in my local zone.

I have also noticed the default dateTime string in Config_en_us was faulty to.
It should have been dateTime = "%-m/%-d/%Y %-I:%M %p"
For 12 hour Hour digits not 24 as it was before "%-H". not "%-I"

I have published a fix 2.1.1.