Opened 8 years ago

Closed 7 years ago

#9850 closed (fixed)

Outdated documentation - (date format strings)

Reported by: cezz Owned by: timo
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: UI/UX:


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 timo 7 years ago.
initial fix

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by timo

initial fix

comment:1 Changed 7 years ago by timo

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to timo
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Ready for checkin
  • Version changed from 1.0 to SVN

comment:2 Changed 7 years ago by kmtracey

  • Triage Stage changed from Ready for checkin to 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:, 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 7 years ago by ericholscher

  • milestone set to 1.1

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

comment:4 Changed 7 years ago by mtredinnick

  • milestone 1.1 deleted

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 7 years ago by gsong

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

comment:6 Changed 7 years ago by timo

  • Resolution set to fixed
  • Status changed from assigned to closed

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