Opened 11 years ago
Last modified 11 years ago
#11012 closed defect
regression in format_date, etc. — at Initial Version
Reported by: | Christian Boos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.1 |
Component: | general | Version: | 1.0-stable |
Severity: | major | Keywords: | datetime |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Looks like in r11445 the support for format='iso8601'
is gone. We probably didn't have unit tests for that feature, but it was documented (format_datetime).
I suppose something like this would do:
-
datefmt.py
196 196 197 197 def _format_datetime(t, format, tzinfo, locale, hint): 198 198 t = to_datetime(t, tzinfo or localtz) 199 199 200 if format == 'iso8601': 201 return _format_datetime_without_babel(t, format + hint) 202 200 203 if locale == 'iso8601': 201 204 format = _ISO8601_FORMATS[hint].get(format, format)
(+ some tests, of course)
Note:
See TracTickets
for help on using tickets.