Opened 13 years ago
Closed 13 years ago
#16416 closed New feature (fixed)
date template tag should support "e" and "o" format character
Reported by: | Carsten Fuchs | Owned by: | Dan Poirier |
---|---|---|---|
Component: | Template system | Version: | 1.3 |
Severity: | Normal | Keywords: | ISO 8601 |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The date template tag currently supports the "W" (ISO 8601 week number) format character, but not the complementing "o" (ISO 8601 year number machting the ISO week number) character.
Both are described at the documentation that the date template tag is referring to:
http://de2.php.net/manual/en/function.date.php
A workaround is possible with a custom template tag, returning the result of datetime.strftime("%G")
.
Attachments (1)
Change History (6)
comment:1 by , 13 years ago
Summary: | date template tag should support "o" format character → date template tag should support "e" and "o" format character |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 13 years ago
Attachment: | 16416.diff added |
---|
comment:3 by , 13 years ago
Has patch: | set |
---|
comment:4 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Here's a list of the differences between what PHP supports and what Django supports:
We should implement
e
ando
, or mention in the docs that they're not implemented, likeB
andI
.Also, iven the divergence of
N
andP
, maybe we could drop the reference to PHP from the docs.