Changeset 4647
- Timestamp:
- 02/28/07 10:18:55 (2 years ago)
- Files:
-
- django/trunk/django/utils/dateformat.py (modified) (2 diffs)
- django/trunk/docs/templates.txt (modified) (1 diff)
- django/trunk/tests/regressiontests/dateformat/tests.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/utils/dateformat.py
r4226 r4647 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 … … 110 110 if hasattr(self.data, 'hour') and not self.timezone: 111 111 self.timezone = LocalTimezone(dt) 112 113 def b(self): 114 "Month, textual, 3 letters, lowercase; e.g. 'jan'" 115 return MONTHS_3[self.data.month] 112 116 113 117 def d(self): django/trunk/docs/templates.txt
r4499 r4647 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'`` django/trunk/tests/regressiontests/dateformat/tests.py
r3862 r4647 18 18 >>> format(my_birthday, 'M') 19 19 'Jul' 20 >>> format(my_birthday, 'b') 21 'jul' 20 22 >>> format(my_birthday, 'n') 21 23 '7'
