2005-07-13 09:25:57 +08:00
|
|
|
"Commonly-used date structures"
|
|
|
|
|
2010-12-13 21:51:28 +08:00
|
|
|
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
|
2005-11-04 12:59:46 +08:00
|
|
|
|
2005-07-13 09:25:57 +08:00
|
|
|
WEEKDAYS = {
|
2005-11-04 12:59:46 +08:00
|
|
|
0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'),
|
|
|
|
5:_('Saturday'), 6:_('Sunday')
|
2005-07-13 09:25:57 +08:00
|
|
|
}
|
Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.
Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 20:11:04 +08:00
|
|
|
WEEKDAYS_ABBR = {
|
|
|
|
0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri'),
|
|
|
|
5:_('Sat'), 6:_('Sun')
|
|
|
|
}
|
2005-07-13 09:25:57 +08:00
|
|
|
WEEKDAYS_REV = {
|
|
|
|
'monday':0, 'tuesday':1, 'wednesday':2, 'thursday':3, 'friday':4,
|
|
|
|
'saturday':5, 'sunday':6
|
|
|
|
}
|
|
|
|
MONTHS = {
|
2005-11-04 12:59:46 +08:00
|
|
|
1:_('January'), 2:_('February'), 3:_('March'), 4:_('April'), 5:_('May'), 6:_('June'),
|
|
|
|
7:_('July'), 8:_('August'), 9:_('September'), 10:_('October'), 11:_('November'),
|
|
|
|
12:_('December')
|
2005-07-13 09:25:57 +08:00
|
|
|
}
|
|
|
|
MONTHS_3 = {
|
2006-05-16 15:38:23 +08:00
|
|
|
1:_('jan'), 2:_('feb'), 3:_('mar'), 4:_('apr'), 5:_('may'), 6:_('jun'),
|
|
|
|
7:_('jul'), 8:_('aug'), 9:_('sep'), 10:_('oct'), 11:_('nov'), 12:_('dec')
|
2005-07-13 09:25:57 +08:00
|
|
|
}
|
|
|
|
MONTHS_3_REV = {
|
|
|
|
'jan':1, 'feb':2, 'mar':3, 'apr':4, 'may':5, 'jun':6, 'jul':7, 'aug':8,
|
|
|
|
'sep':9, 'oct':10, 'nov':11, 'dec':12
|
|
|
|
}
|
|
|
|
MONTHS_AP = { # month names in Associated Press style
|
2011-01-22 06:25:50 +08:00
|
|
|
1: pgettext_lazy('abbrev. month', 'Jan.'),
|
|
|
|
2: pgettext_lazy('abbrev. month', 'Feb.'),
|
|
|
|
3: pgettext_lazy('abbrev. month', 'March'),
|
|
|
|
4: pgettext_lazy('abbrev. month', 'April'),
|
|
|
|
5: pgettext_lazy('abbrev. month', 'May'),
|
|
|
|
6: pgettext_lazy('abbrev. month', 'June'),
|
|
|
|
7: pgettext_lazy('abbrev. month', 'July'),
|
|
|
|
8: pgettext_lazy('abbrev. month', 'Aug.'),
|
|
|
|
9: pgettext_lazy('abbrev. month', 'Sept.'),
|
|
|
|
10: pgettext_lazy('abbrev. month', 'Oct.'),
|
|
|
|
11: pgettext_lazy('abbrev. month', 'Nov.'),
|
|
|
|
12: pgettext_lazy('abbrev. month', 'Dec.')
|
2005-07-13 09:25:57 +08:00
|
|
|
}
|
2010-12-13 21:51:28 +08:00
|
|
|
MONTHS_ALT = { # required for long date representation by some locales
|
|
|
|
1: pgettext_lazy('alt. month', 'January'),
|
|
|
|
2: pgettext_lazy('alt. month', 'February'),
|
|
|
|
3: pgettext_lazy('alt. month', 'March'),
|
|
|
|
4: pgettext_lazy('alt. month', 'April'),
|
|
|
|
5: pgettext_lazy('alt. month', 'May'),
|
|
|
|
6: pgettext_lazy('alt. month', 'June'),
|
|
|
|
7: pgettext_lazy('alt. month', 'July'),
|
|
|
|
8: pgettext_lazy('alt. month', 'August'),
|
|
|
|
9: pgettext_lazy('alt. month', 'September'),
|
|
|
|
10: pgettext_lazy('alt. month', 'October'),
|
|
|
|
11: pgettext_lazy('alt. month', 'November'),
|
|
|
|
12: pgettext_lazy('alt. month', 'December')
|
|
|
|
}
|