Ticket #12309: django-12309.diff
File django-12309.diff, 1.8 KB (added by , 15 years ago) |
---|
-
django/utils/dates.py
31 31 1:_('Jan.'), 2:_('Feb.'), 3:_('March'), 4:_('April'), 5:_('May'), 6:_('June'), 7:_('July'), 32 32 8:_('Aug.'), 9:_('Sept.'), 10:_('Oct.'), 11:_('Nov.'), 12:_('Dec.') 33 33 } 34 MONTHS_ALTERNATIVE = { # required by some locales 35 1:_('_January'), 2:_('_February'), 3:_('_March'), 4:_('_April'), 5:_('_May'), 6:_('_June'), 36 7:_('_July'), 8:_('_August'), 9:_('_September'), 10:_('_October'), 11:_('_November'), 37 12:_('_December') 38 } 39 No newline at end of file -
django/utils/dateformat.py
14 14 import re 15 15 import time 16 16 import calendar 17 from django.utils.dates import MONTHS, MONTHS_3, MONTHS_AP, WEEKDAYS, WEEKDAYS_ABBR 17 from django.utils.dates import MONTHS, MONTHS_3, MONTHS_AP, WEEKDAYS, WEEKDAYS_ABBR, MONTHS_ALTERNATIVE 18 18 from django.utils.tzinfo import LocalTimezone 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'(?<!\\)([aAbBdD fFgGhHiIjlLmMnNOPrsStTUwWyYzZ])')22 re_formatchars = re.compile(r'(?<!\\)([aAbBdDEfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])') 23 23 re_escaped = re.compile(r'\\(.)') 24 24 25 25 class Formatter(object): … … 126 126 "Day of the week, textual, 3 letters; e.g. 'Fri'" 127 127 return WEEKDAYS_ABBR[self.data.weekday()] 128 128 129 def E(self): 130 "Alternative month names as required by some locales" 131 return MONTHS_ALTERNATIVE[self.data.month] 132 129 133 def F(self): 130 134 "Month, textual, long; e.g. 'January'" 131 135 return MONTHS[self.data.month]