While there are some backwards compatibility concerns, I believe option 1
is better:

- It provides consistency out-of-the-box for international websites.
- It makes the default behavior more reasonable in general.

-- 
Aymeric.

2014-09-10 17:56 GMT+02:00 Malte <[email protected]>:

> Hi!
>
> I recently contributed the zh_CN, zh_TW, zh_Hans and zh_Hant locale
> formats. These locale formats enable dates and times to be formatted
> correctly in a given locale. While doing this, I noticed different authors
> have very different ideas of how time should be displayed, in particular,
> some authors decided for seconds to be part of standard time output. I
> really question the validity of having seconds in standard dates.
>
> For you to get an idea of what files I am talking about, here is an
> example of a formats.py file for the locale zh_CN. Time is shown in the
> format H:i, so 20:45. Note the absence of seconds:
> https://github.com/django/django/blob/master/django/conf/locale/zh_CN/formats.py
>
> In some locales, like German and Spanish, just to name two random
> examples, seconds are included in the standard time output. IMHO, seconds
> are not required in most use cases. Time output with seconds or even
> milli-seconds is relatively rare.
>
> 3 random examples:
>
> In default en locale (English), the time output is 8:45 pm.
> In Chinese, it's 20:45. But in de locale (German), it's 20:45:29.
> In en locale (Spanish), it's not even uniformly applied.
>
> Code examples from the respective locale/formats.py files:
>
> EN (English):
> TIME_FORMAT = 'P'
> DATETIME_FORMAT = 'N j, Y, P'
> SHORT_DATETIME_FORMAT = 'm/d/Y P'
> Conclusion: All time formats without seconds.
>
> DE (German):
> TIME_FORMAT = 'H:i:s'
> DATETIME_FORMAT = 'j. F Y H:i:s'
> SHORT_DATETIME_FORMAT = 'd.m.Y H:i:s'
> Conclusion: All time formats with seconds.
>
> ES (Spanish):
> TIME_FORMAT = 'H:i:s'
> DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i'
> SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
> Conclusion: Not uniform. One time format with seconds, two time formats
> without seconds.
>
> I have two suggestions:
> Option 1) Purge seconds from all time formats.
> Option 2) Introduce new time formats.
>
> What do you all think? I favor option 1. But I would like to hear what
> other devs think before opening a ticket. Perhaps I am the only one
> bothered by this. But when you are building a truly international project,
> locale formatting is crucial.
>
> Cheers,
> /malte
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/61399a30-a442-44a6-9991-a1c5bfd3809c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/61399a30-a442-44a6-9991-a1c5bfd3809c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Aymeric.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANE-7mXbMpMZeAh3iSahWKFYz9KNuGGO0dR7g51_MTdmM59HVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to