Opened 17 years ago
Closed 15 years ago
#5526 closed (fixed)
Localized Date/DateTime fields proposal
Reported by: | Jan Rademaker | Owned by: | Marc Garcia |
---|---|---|---|
Component: | contrib.localflavor | Version: | dev |
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: | no | UI/UX: | no |
Description
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 django.contrib.localflavor.nl.forms import DateField >>> f = DateField() >>> f.clean('25 augustus 2003') datetime.date(2003, 8, 25) >>> from django.contrib.localflavor.nl.widgets import DateTimeInput >>> d = DateTimeInput(date_output_format='%d %B %Y') >>> d.render('foo', datetime.now()) u'<input type="text" name="foo" value="17 september 2007" />'
Attachments (1)
Change History (9)
by , 17 years ago
Attachment: | localflavor_datetimefields.patch added |
---|
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
Interesting idea janr - can you float this on django-developers?
comment:3 by , 16 years ago
Keywords: | i18n-rf added |
---|
comment:4 by , 16 years ago
milestone: | → post-1.0 |
---|
comment:6 by , 15 years ago
Keywords: | i18n-fixed added; i18n-rf removed |
---|---|
Owner: | changed from | to
Fixed in branches/soc2009/i18n-improvements.
comment:7 by , 15 years ago
Triage Stage: | Design decision needed → Fixed on a branch |
---|
comment:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → 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.
Reattached the patch