Opened 17 years ago

Closed 17 years ago

#5869 closed (fixed)

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

Reported by: xavier.morel@… Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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)

Change History (1)

comment:1 by Gary Wilson, 17 years ago

Resolution: fixed
Status: newclosed

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

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