Modify ↓
#11012 closed defect (fixed)
regression in format_date, etc.
| Reported by: | Christian Boos | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.1 |
| Component: | general | Version: | 1.0-stable |
| Severity: | major | Keywords: | datetime |
| Cc: | Branch: | ||
| Release Notes: |
Fixed regression in support of |
||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
Looks like in r11445 the support for format='iso8601' in format_date and format_time 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)
Attachments (0)
Change History (5)
comment:1 by , 13 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:3 by , 13 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
The patch with unit tests is committed in [11510-11511]. Thanks.
comment:5 by , 12 years ago
| Release Notes: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.



Oh…. The unit tests for
format_datetimewithformat=iso8601are in branches/1.0-stable/trac/util/tests/datefmt.py#L526, but the tests forformat_dateandformat_timeare missing.I'll commit the patch with tests later. Thanks!