#5526 - Localized Date/DateTime fields proposal

4 views
Skip to first unread message

Jan Rademaker

unread,
Sep 20, 2007, 2:44:09 PM9/20/07
to Django developers
Hi list,

Ticket #5526 provides a Dutch DateField, a DateTimeField and a
DateTimeInput widget. Some code is based on the generic DateField
introduced in [6208]. The problem with this new generic DateField is
that it's impossible to parse non-English month names (%B and the like
in strftime), because it depends on time.srtptime. To properly parse
or output Dutch month names it makes use of the locale module.

The locale is changed as late as possible by overriding clean and
render. The patch also takes into account that not all locales may be
available on all systems. That's why it allows to specify a list of
alternatives. If non of the requested locales are available the
localized DateField acts the same as the current non-localized
DateField.

What do you think of this idea?

Regards,

Jan Rademaker

Ticket: http://code.djangoproject.com/ticket/5526

Reply all
Reply to author
Forward
0 new messages