Django

Code

Ticket #5869 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

Incorrect description for the NOW format string's 'r' flag

Reported by: xavier.morel@masklinn.net Assigned to: nobody
Milestone: Component: Documentation
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation:
Needs tests: Patch needs improvement:

Description

In the Templates documentation, the Now tag's format character n is indicated as creating a RFC 822 formatted date., but the example output 'Thu, 21 Dec 2000 16:01:07 +0200' is an RFC 2822 date format:

RFC 822 section 5.1 defines date as

     date        =  1*2DIGIT month 2DIGIT        ; day month year
                                                 ;  e.g. 20 Jun 82

which only has 2-digits year notation.

On the other hand, RFC 2822 section 3.3 defines date as

date            =       day month year

year            =       4*DIGIT / obs-year

month           =       (FWS month-name FWS) / obs-month

month-name      =       "Jan" / "Feb" / "Mar" / "Apr" /
                        "May" / "Jun" / "Jul" / "Aug" /
                        "Sep" / "Oct" / "Nov" / "Dec"

day             =       ([FWS] 1*2DIGIT) / obs-day

with year being either 4 digits or 2 digits (obs-year refers to RFC 822 year formatting)

Attachments

Change History

11/03/07 20:14:58 changed by gwilson

  • status changed from new to closed.
  • resolution set to fixed.

(In [6640]) Fixed #5869 -- Corrected documentation for now template tag's "r" format character. Thanks, xavier.morel@masklinn.net.


Add/Change #5869 (Incorrect description for the NOW format string's 'r' flag)




Change Properties
Action