Ticket #3488: 3488.diff

File 3488.diff, 1.4 KB (added by Gary Wilson <gary.wilson@…>, 18 years ago)

patch and docs

  • django/utils/dateformat.py

    === modified file 'django/utils/dateformat.py'
     
    1616from calendar import isleap, monthrange
    1717import re, time
    1818
    19 re_formatchars = re.compile(r'(?<!\\)([aABdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])')
     19re_formatchars = re.compile(r'(?<!\\)([aAbBdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])')
    2020re_escaped = re.compile(r'\\(.)')
    2121
    2222class Formatter(object):
     
    110110        if hasattr(self.data, 'hour') and not self.timezone:
    111111            self.timezone = LocalTimezone(dt)
    112112
     113    def b(self):
     114        "Month, textual, 3 letters, lowercase; e.g. 'jan'"
     115        return MONTHS_3[self.data.month]
     116
    113117    def d(self):
    114118        "Day of the month, 2 digits with leading zeros; i.e. '01' to '31'"
    115119        return '%02d' % self.data.day
  • docs/templates.txt

    === modified file 'docs/templates.txt'
     
    645645                      output, because this includes periods
    646646                      to match Associated Press style.)
    647647    A                 ``'AM'`` or ``'PM'``.                     ``'AM'``
     648    b                 Month, textual, 3 letters, lowercase.     ``'jan'``
    648649    B                 Not implemented.
    649650    d                 Day of the month, 2 digits with           ``'01'`` to ``'31'``
    650651                      leading zeros.
Back to Top