Opened 16 years ago
Closed 16 years ago
#9850 closed (fixed)
Outdated documentation - (date format strings)
Description ¶
Page http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now says that format string "U" is Not implemented, but it actually works for me using django 1.0.2 (it returns Unix timestamp)
Change History (7)
by , 16 years ago
Attachment: | format_U.diff added |
---|
comment:1 by , 16 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Ready for checkin |
Version: | 1.0 → SVN |
comment:2 by , 16 years ago
Triage Stage: | Ready for checkin → Design decision needed |
---|
Before checking in a doc change that claims something works, we should first verify it works. Adding a testcase that attempts to use this formatting option would seem to be wise. Actually, based on #10318 and the associated django-users thread: http://groups.google.com/group/django-users/browse_thread/thread/5a156fbddee22d3b/e255ffea08bd3d4d, it appears the doc is more right than wrong here -- I can't see how the existing code is correct.
I don't know whether the right answer is to to fix the code to match the doc (raise NotImplemented there, as it used to before r992) or fix the implementation.
Note #10318 has a test, but that test fails on Windows due to strftime('%s') there returning an empty string rather then a number, so that test can't be directly used in our test suite.
comment:3 by , 16 years ago
milestone: | → 1.1 |
---|
Seems like this should be in 1.1 like #10825. Feel free to revert if not.
comment:4 by , 16 years ago
milestone: | 1.1 |
---|
This isn't 1.1 material. Karen's comment indicates why: it's not a public feature at the moment and needs a bunch of work to fix things.
comment:5 by , 16 years ago
Patch over at #10825 that incorporates changes for this ticket as well, since they go hand-in-hand.
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
initial fix