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