globalize icon indicating copy to clipboard operation
globalize copied to clipboard

24 hour usage in nl

Open sstok opened this issue 15 years ago • 2 comments

In the NL culture, and other European cultures as well (except for the UK). We use the 24 hour (HH) time notation instead of the 12 (h) time notation.

Without something like am/pm its unclear what part of the day it is.

sstok avatar Jul 09 '11 15:07 sstok

I'm not sure I see what the problem is. If you use 24-hour notation, then you know from the time denotation what part of the day it is. If it's 9:23, then it's morning, as you would see 21:23 if it were 9:23 PM.

It could be a problem if the user cannot be sure of the 24-hour notation being in use, e.g. when he sees just 9:23 in isolation, or just times before noon. In my country (Finland), 24-hour notation is so well-established that the risk is minimal, I would say. (In speech, we mostly use an equivalent of "9 PM", though digital watches and displays are changing this - but when a time is written down, it's always in 24-hour notation.)

It is a bit tricky that in Globalize (unlike in CLDR), there is no separate property that tells whether a culture uses a 24-hour or a 12-hour notation. But I don't think this is a big issue, because this can be inferred from the AM and PM properties: if their values are null, the culture uses 24-hour notation.

It might occasionally be useful to include an "AM" designator to times before the noon, in a culture where 24-hour clock is used. I'm afraid you would have to do that manually, in the sense of writing a function of your own that writes out a time using Globalize.format() and then conditionally appends " AM".

yucca42 avatar Jul 11 '11 06:07 yucca42

Oops, my bad.

h Hours (12 hour time, no leading zero) 6 hh Hours (12 hour time, leading zero) 06 H Hours (24 hour time, no leading zero) 5 (5am) 15 (3pm) HH Hours (24 hour time, leading zero)

I misread, I thought H was the same as h (12 hour). I'm not accustomed to using the ICU format (yet), I have only worked with date() from PHP so far.

Keep up the good work!

sstok avatar Jul 11 '11 07:07 sstok