purescript-contrib / purescript-formatters

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

Use 12 instead of 0, PM starts at 12, not 13 #5

Closed doolse closed 8 years ago

doolse commented 8 years ago

I'm hoping the rules for 12 hour time are the same everywhere.. noon should be: 12:00 PM instead of: 00:00 AM

garyb commented 8 years ago

I agree that 00:00 AM is wrong, but I think it's more common that 12:00 AM is midnight and 12:00 PM is noon. A quick google suggests that it's neither AM or PM and should be avoided in favour of "12 noon" and "12 midnight", but we probably don't want to do that for the purposes of this.

doolse commented 8 years ago

Just to be clear - old behaviour was: 00:00 -> 00:00 AM ... 11:00 -> 11:00 AM 12:00 -> 00:00 AM 13:00 -> 01:00 PM ...

The patch changes this to: 00:00 -> 12:00 AM ... 11:00 -> 11:00 AM 12:00 -> 12:00 PM 13:00 -> 01:00 PM ...

I think we all agree this is what we want?

garyb commented 8 years ago

Oh, sorry! I totally misread your original comment, I should have just looked at the code. :smile:

:+1: from me, but I'll let @cryogenian have his say too.

cryogenian commented 8 years ago

:+1: Thank you very much!