Module calendar :: Class Calendar
[hide private]
[frames] | no frames]

Class Calendar

object --+
         |
        Calendar
Known Subclasses:

Base calendar class. This class doesn't do any formatting. It simply provides data to subclasses.

Instance Methods [hide private]
 
__init__(self, firstweekday=0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
getfirstweekday(self)
 
setfirstweekday(self, firstweekday)
 
iterweekdays(self)
Return a iterator for one week of weekday numbers starting with the configured first one.
 
itermonthdates(self, year, month)
Return an iterator for one month.
 
itermonthdays2(self, year, month)
Like itermonthdates(), but will yield (day number, weekday number) tuples.
 
itermonthdays(self, year, month)
Like itermonthdates(), but will yield day numbers tuples.
 
monthdatescalendar(self, year, month)
Return a matrix (list of lists) representing a month's calendar.
 
monthdays2calendar(self, year, month)
Return a matrix representing a month's calendar.
 
monthdayscalendar(self, year, month)
Return a matrix representing a month's calendar.
 
yeardatescalendar(self, year, width=3)
Return the data for the specified year ready for formatting.
 
yeardays2calendar(self, year, width=3)
Return the data for the specified year ready for formatting (similar to yeardatescalendar()).
 
yeardayscalendar(self, year, width=3)
Return the data for the specified year ready for formatting (similar to yeardatescalendar()).

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]
  firstweekday

Inherited from object: __class__

Method Details [hide private]

__init__(self, firstweekday=0)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

itermonthdates(self, year, month)

 

Return an iterator for one month. The iterator will yield datetime.date values and will always iterate through complete weeks, so it will yield dates outside the specified month.

itermonthdays2(self, year, month)

 

Like itermonthdates(), but will yield (day number, weekday number) tuples. For days outside the specified month the day number is 0.

itermonthdays(self, year, month)

 

Like itermonthdates(), but will yield day numbers tuples. For days outside the specified month the day number is 0.

monthdatescalendar(self, year, month)

 

Return a matrix (list of lists) representing a month's calendar. Each row represents a week; week entries are datetime.date values.

monthdays2calendar(self, year, month)

 

Return a matrix representing a month's calendar. Each row represents a week; week entries are (day number, weekday number) tuples. Day numbers outside this month are zero.

monthdayscalendar(self, year, month)

 

Return a matrix representing a month's calendar. Each row represents a week; days outside this month are zero.

yeardatescalendar(self, year, width=3)

 

Return the data for the specified year ready for formatting. The return value is a list of month rows. Each month row contains upto width months. Each month contains between 4 and 6 weeks and each week contains 1-7 days. Days are datetime.date objects.

yeardays2calendar(self, year, width=3)

 

Return the data for the specified year ready for formatting (similar to yeardatescalendar()). Entries in the week lists are (day number, weekday number) tuples. Day numbers outside this month are zero.

yeardayscalendar(self, year, width=3)

 

Return the data for the specified year ready for formatting (similar to yeardatescalendar()). Entries in the week lists are day numbers. Day numbers outside this month are zero.


Property Details [hide private]

firstweekday

Get Method:
getfirstweekday(self)
Set Method:
setfirstweekday(self, firstweekday)