Ticket #12109: dateformat.patch
File dateformat.patch, 928 bytes (added by , 15 years ago) |
---|
-
django/utils/dateformat.py
19 19 from django.utils.translation import ugettext as _ 20 20 from django.utils.encoding import force_unicode 21 21 22 re_formatchars = re.compile(r'(?<!\\)([aAbB dDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])')22 re_formatchars = re.compile(r'(?<!\\)([aAbBcdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])') 23 23 re_escaped = re.compile(r'\\(.)') 24 24 25 25 class Formatter(object): … … 118 118 "Month, textual, 3 letters, lowercase; e.g. 'jan'" 119 119 return MONTHS_3[self.data.month] 120 120 121 def c(self): 122 "ISO 8601 date; i.e 2004-02-12T15:19:21+00:00" 123 return u'%s' % self.data.isoformat() 124 121 125 def d(self): 122 126 "Day of the month, 2 digits with leading zeros; i.e. '01' to '31'" 123 127 return u'%02d' % self.data.day