calendar
index
/usr/lib/python1.6/calendar.py

Calendar printing functions

 
Functions
            
_center(str, width)
Center a string in a field.
_monthcalendar(year, month)
Return a matrix representing a month's calendar.
Each row represents a week; days outside this month are zero.
format3c(a, b, c)
3-column formatting for year calendars
isleap(year)
Return 1 for leap years, 0 for non-leap years.
leapdays(y1, y2)
Return number of leap years in range [y1, y2).
Assume y1 <= y2 and no funny (non-leap century) years.
localtime(...)
localtime(seconds) -> tuple
Convert seconds since the Epoch to a time tuple expressing local time.
mktime(...)
mktime(tuple) -> floating point number
 
Convert a time tuple in local time to seconds since the Epoch.
monthcalendar(year, month)
Caching interface to _monthcalendar.
monthrange(year, month)
Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month.
prcal(year)
Print a year's calendar.
prmonth(year, month, w=0, l=0)
Print a month's calendar.
prweek(week, width)
Print a single week (no newline).
timegm(tuple)
Unrelated but handy function to calculate Unix timestamp from GMT.
weekday(year, month, day)
Return weekday (0-6 ~ Mon-Sun) for year (1970-...), month (1-12), day (1-31).
weekheader(width)
Return a header for a week.

 
Data
             EPOCH = 1970
February = 2
January = 1
__file__ = '/usr/lib/python1.6/calendar.pyc'
__name__ = 'calendar'
_colwidth = 20
_mc_cache = {}
_spacing = ' '
day_abbr = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
day_name = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
mdays = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
month_abbr = [' ', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
month_name = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']