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