Fred Drake | 1c127e7 | 1998-04-28 14:28:57 +0000 | [diff] [blame] | 1 | % This section was contributed by Drew Csillag <drew_csillag@geocities.com>. |
| 2 | |
| 3 | \section{Standard Module \module{calendar}} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 4 | \declaremodule{standard}{calendar} |
| 5 | |
| 6 | \modulesynopsis{None} |
| 7 | |
Fred Drake | 1c127e7 | 1998-04-28 14:28:57 +0000 | [diff] [blame] | 8 | |
| 9 | |
| 10 | This module allows you to output calendars like the \UNIX{} |
| 11 | \manpage{cal}{1} program. |
| 12 | |
| 13 | \begin{funcdesc}{isleap}{year} |
| 14 | Returns \code{1} if \var{year} is a leap year. |
| 15 | \end{funcdesc} |
| 16 | |
| 17 | \begin{funcdesc}{leapdays}{year1, year2} |
| 18 | Return the number of leap years in the range |
| 19 | [\var{year1}\ldots\var{year2}]. |
| 20 | \end{funcdesc} |
| 21 | |
| 22 | \begin{funcdesc}{weekday}{year, month, day} |
| 23 | Returns the day of the week (\code{0} is Monday) for \var{year} |
Fred Drake | 02379fa | 1998-05-08 15:39:40 +0000 | [diff] [blame] | 24 | (\code{1970}--\ldots), \var{month} (\code{1}--\code{12}), \var{day} |
Fred Drake | 1c127e7 | 1998-04-28 14:28:57 +0000 | [diff] [blame] | 25 | (\code{1}--\code{31}). |
| 26 | \end{funcdesc} |
| 27 | |
| 28 | \begin{funcdesc}{monthrange}{year, month} |
| 29 | Returns weekday of first day of the month and number of days in month, |
| 30 | for the specified \var{year} and \var{month}. |
| 31 | \end{funcdesc} |
| 32 | |
| 33 | \begin{funcdesc}{monthcalendar}{year, month} |
| 34 | Returns a matrix representing a month's calendar. Each row represents |
| 35 | a week; days outside of the month a represented by zeros. |
| 36 | \end{funcdesc} |
| 37 | |
| 38 | \begin{funcdesc}{prmonth}{year, month\optional{, width\optional{, length}}} |
| 39 | Prints a month's calendar. If \var{width} is provided, it specifies |
| 40 | the width of the columns that the numbers are centered in. If |
| 41 | \var{length} is given, it specifies the number of lines that each |
| 42 | week will use. |
| 43 | \end{funcdesc} |
| 44 | |
| 45 | \begin{funcdesc}{prcal}{year} |
| 46 | Prints the calendar for the year \var{year}. |
| 47 | \end{funcdesc} |