开发者

International notation for input time format

I have a page that tells the user to input a time in the format hh:mm:ss. This is obviously fine for English speaking audiences,开发者_StackOverflow社区 but is this an acceptable international notation?

If not, could you give me some examples of how other countries display this kind of information to the user.


In terms of time, it is usually either in format hh:mm:ss or h:mm:ss, that is you either do zero-padding or no zero padding for single digits hours.
Another thing is, the format - distinction between 12 hours and 24 hours, that also varies from Locale to Locale.

Lastly, you should take into account local user's time zone - it is natural to enter the time in relation to current time zone.

How would you go about these options? Basically, it depends on what your UI look like. If you have just one text box where user can enter free-form text, you should actually parse the text according to valid Locale format. In that case you can give an example of the format, by formatting current day, so the label would say something like "Enter the time (for example: 16:36:11):".
Other approach is to have two (hour/minute) or more text fields (seconds) separated by time separator (":") and possibly conditional AM/PM radio button group (or drop down). In that case it would be a bit harder, because to do that correctly, you should actually analyze the localized pattern (on what is and what is not supported) and dynamically create UI elements (I don't want to see AM/PM stuff as I am using 24 hours time naturally) as well as validation rules...


I know dates are different between different country, but time is pretty standard. you won't have problem with French, spanish, german, UK... i don't know for asian country tho...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜