diff options
| author | Boulder Sprinters <boulder-sprinters@djangoproject.com> | 2007-03-09 17:43:46 +0000 |
|---|---|---|
| committer | Boulder Sprinters <boulder-sprinters@djangoproject.com> | 2007-03-09 17:43:46 +0000 |
| commit | 0b7dd14d1f87e2ecef7aacc39fe4189667ed4fdf (patch) | |
| tree | b77497f9de324d38a9c6341e54d2742633e20055 /django/utils/dateformat.py | |
| parent | e17f75551491f5b864c1fc8a97c21d0b2bbf0bcd (diff) | |
boulder-oracle-sprint: Merged to trunk [4692].
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/dateformat.py')
| -rw-r--r-- | django/utils/dateformat.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py index 00eb9fe617..e3712175af 100644 --- a/django/utils/dateformat.py +++ b/django/utils/dateformat.py @@ -16,7 +16,7 @@ from django.utils.tzinfo import LocalTimezone from calendar import isleap, monthrange import re, time -re_formatchars = re.compile(r'(?<!\\)([aABdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])') +re_formatchars = re.compile(r'(?<!\\)([aAbBdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])') re_escaped = re.compile(r'\\(.)') class Formatter(object): @@ -110,6 +110,10 @@ class DateFormat(TimeFormat): if hasattr(self.data, 'hour') and not self.timezone: self.timezone = LocalTimezone(dt) + def b(self): + "Month, textual, 3 letters, lowercase; e.g. 'jan'" + return MONTHS_3[self.data.month] + def d(self): "Day of the month, 2 digits with leading zeros; i.e. '01' to '31'" return '%02d' % self.data.day |
