Opened 9 years ago

Closed 7 years ago

#5526 closed (fixed)

Localized Date/DateTime fields proposal

Reported by: janr Owned by: garcia_marc
Component: contrib.localflavor Version: master
Severity: Keywords: i18n-fixed
Cc: Triage Stage: Fixed on a branch
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


This is an attempt at providing Date/DateTime fields for locales other than
English. The patch provides a DateField, DateTimeField and
DateTimeInput widget that accept Dutch input.

It should be relatively easy to add additional locales (at least, that was the setup) .

Short example:

>>> from import DateField
>>> f = DateField()
>>> f.clean('25 augustus 2003'), 8, 25)

>>> from import DateTimeInput
>>> d = DateTimeInput(date_output_format='%d %B %Y')
>>> d.render('foo',
u'<input type="text" name="foo" value="17 september 2007" />'

Attachments (1)

localflavor_datetimefields.patch (12.6 KB) - added by janr 9 years ago.
Reattached the patch

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by janr

Reattached the patch

comment:1 Changed 9 years ago by Simon G. <dev@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

Interesting idea janr - can you float this on django-developers?

comment:3 Changed 8 years ago by garcia_marc

  • Keywords i18n-rf added

comment:4 Changed 8 years ago by anonymous

  • milestone set to post-1.0

comment:5 Changed 8 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:6 Changed 7 years ago by garcia_marc

  • Keywords i18n-fixed added; i18n-rf removed
  • Owner changed from nobody to garcia_marc

Fixed in branches/soc2009/i18n-improvements.

comment:7 Changed 7 years ago by garcia_marc

  • Triage Stage changed from Design decision needed to Fixed on a branch

comment:8 Changed 7 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

(In [11964]) Fixed #7980 - Improved i18n framework to support locale aware formatting (dates and numbers) and form processing.

Thanks to Marc Garcia for working on this during his Google Summer of Code 2009!

Additionally fixes #1061, #2203, #3940, #5526, #6449, #6231, #6693, #6783, #9366 and #10891.

Note: See TracTickets for help on using tickets.
Back to Top