Opened 10 years ago

Closed 10 years ago

#9850 closed (fixed)

Outdated documentation - (date format strings)

Reported by: cezz Owned by: Tim Graham
Component: Documentation Version: master
Severity: Keywords: now format strings
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Page says that format string "U" is Not implemented, but it actually works for me using django 1.0.2 (it returns Unix timestamp)

Attachments (1)

format_U.diff (785 bytes) - added by Tim Graham 10 years ago.
initial fix

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by Tim Graham

Attachment: format_U.diff added

initial fix

comment:1 Changed 10 years ago by Tim Graham

Has patch: set
Owner: changed from nobody to Tim Graham
Status: newassigned
Triage Stage: UnreviewedReady for checkin
Version: 1.0SVN

comment:2 Changed 10 years ago by Karen Tracey

Triage Stage: Ready for checkinDesign 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:, 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 Changed 10 years ago by Eric Holscher

milestone: 1.1

Seems like this should be in 1.1 like #10825. Feel free to revert if not.

comment:4 Changed 10 years ago by Malcolm Tredinnick

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 Changed 10 years ago by George Song

Patch over at #10825 that incorporates changes for this ticket as well, since they go hand-in-hand.

comment:6 Changed 10 years ago by Tim Graham

Resolution: fixed
Status: assignedclosed

fixed: (In [10716]) Fixed #10825: fixed the 'U' format code to dateformat (and the date/now filter/tag).

Note: See TracTickets for help on using tickets.
Back to Top