28 lines
896 B
Python
28 lines
896 B
Python
|
"Commonly-used date structures"
|
||
|
|
||
|
WEEKDAYS = {
|
||
|
0:'Monday', 1:'Tuesday', 2:'Wednesday', 3:'Thursday', 4:'Friday',
|
||
|
5:'Saturday', 6:'Sunday'
|
||
|
}
|
||
|
WEEKDAYS_REV = {
|
||
|
'monday':0, 'tuesday':1, 'wednesday':2, 'thursday':3, 'friday':4,
|
||
|
'saturday':5, 'sunday':6
|
||
|
}
|
||
|
MONTHS = {
|
||
|
1:'January', 2:'February', 3:'March', 4:'April', 5:'May', 6:'June',
|
||
|
7:'July', 8:'August', 9:'September', 10:'October', 11:'November',
|
||
|
12:'December'
|
||
|
}
|
||
|
MONTHS_3 = {
|
||
|
1:'jan', 2:'feb', 3:'mar', 4:'apr', 5:'may', 6:'jun', 7:'jul', 8:'aug',
|
||
|
9:'sep', 10:'oct', 11:'nov', 12:'dec'
|
||
|
}
|
||
|
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
|
||
|
1:'Jan.', 2:'Feb.', 3:'March', 4:'April', 5:'May', 6:'June', 7:'July',
|
||
|
8:'Aug.', 9:'Sept.', 10:'Oct.', 11:'Nov.', 12:'Dec.'
|
||
|
}
|