Ticket #3488: 3488.diff
| File 3488.diff, 1.4 kB (added by Gary Wilson <gary.wilson@gmail.com>, 2 years ago) |
|---|
-
django/utils/dateformat.py
old new 16 16 from calendar import isleap, monthrange 17 17 import re, time 18 18 19 re_formatchars = re.compile(r'(?<!\\)([aA BdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])')19 re_formatchars = re.compile(r'(?<!\\)([aAbBdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])') 20 20 re_escaped = re.compile(r'\\(.)') 21 21 22 22 class Formatter(object): … … 110 110 if hasattr(self.data, 'hour') and not self.timezone: 111 111 self.timezone = LocalTimezone(dt) 112 112 113 def b(self): 114 "Month, textual, 3 letters, lowercase; e.g. 'jan'" 115 return MONTHS_3[self.data.month] 116 113 117 def d(self): 114 118 "Day of the month, 2 digits with leading zeros; i.e. '01' to '31'" 115 119 return '%02d' % self.data.day -
docs/templates.txt
old new 645 645 output, because this includes periods 646 646 to match Associated Press style.) 647 647 A ``'AM'`` or ``'PM'``. ``'AM'`` 648 b Month, textual, 3 letters, lowercase. ``'jan'`` 648 649 B Not implemented. 649 650 d Day of the month, 2 digits with ``'01'`` to ``'31'`` 650 651 leading zeros.
