diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-03-01 00:07:42 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-03-01 00:07:42 +0000 |
| commit | b0bbdc744d17565ae957ed9cad685c2dc47a3d84 (patch) | |
| tree | 58bebcadaf689113b128aa6e5a0f9f83fd426af7 /django/utils/dateformat.py | |
| parent | 811163d24e66d9c1ab9dbb6f69aa368d35a13df8 (diff) | |
Merged to [4656]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4657 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 |
