Django

Code

root/django/branches/gis/django/utils/dates.py

Revision 6018, 1.2 kB (checked in by jbronn, 1 year ago)

gis: Made necessary modifications for unicode, manage refactor, backend refactor and merged 5584-6000 via svnmerge from trunk.

  • Property svn:eol-style set to native
  • Property svn:keywords set to LastChangedRevision
Line 
1 "Commonly-used date structures"
2
3 from django.utils.translation import ugettext_lazy as _
4
5 WEEKDAYS = {
6     0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'),
7     5:_('Saturday'), 6:_('Sunday')
8 }
9 WEEKDAYS_ABBR = {
10     0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri'),
11     5:_('Sat'), 6:_('Sun')
12 }
13 WEEKDAYS_REV = {
14     'monday':0, 'tuesday':1, 'wednesday':2, 'thursday':3, 'friday':4,
15     'saturday':5, 'sunday':6
16 }
17 MONTHS = {
18     1:_('January'), 2:_('February'), 3:_('March'), 4:_('April'), 5:_('May'), 6:_('June'),
19     7:_('July'), 8:_('August'), 9:_('September'), 10:_('October'), 11:_('November'),
20     12:_('December')
21 }
22 MONTHS_3 = {
23     1:_('jan'), 2:_('feb'), 3:_('mar'), 4:_('apr'), 5:_('may'), 6:_('jun'),
24     7:_('jul'), 8:_('aug'), 9:_('sep'), 10:_('oct'), 11:_('nov'), 12:_('dec')
25 }
26 MONTHS_3_REV = {
27     'jan':1, 'feb':2, 'mar':3, 'apr':4, 'may':5, 'jun':6, 'jul':7, 'aug':8,
28     'sep':9, 'oct':10, 'nov':11, 'dec':12
29 }
30 MONTHS_AP = { # month names in Associated Press style
31     1:_('Jan.'), 2:_('Feb.'), 3:_('March'), 4:_('April'), 5:_('May'), 6:_('June'), 7:_('July'),
32     8:_('Aug.'), 9:_('Sept.'), 10:_('Oct.'), 11:_('Nov.'), 12:_('Dec.')
33 }
Note: See TracBrowser for help on using the browser.