1 % This section was contributed by Drew Csillag <drew_csillag@geocities.com>.
3 \section{\module{calendar
} ---
4 Functions that emulate the
\UNIX{} \program{cal
} program.
}
5 \declaremodule{standard
}{calendar
}
7 \modulesynopsis{Functions that emulate the
\UNIX{} \program{cal
}
11 This module allows you to output calendars like the
\UNIX{}
12 \manpage{cal
}{1} program.
14 \begin{funcdesc
}{isleap
}{year
}
15 Returns
\code{1} if
\var{year
} is a leap year.
18 \begin{funcdesc
}{leapdays
}{year1, year2
}
19 Return the number of leap years in the range
20 [\var{year1
}\ldots\var{year2
}].
23 \begin{funcdesc
}{weekday
}{year, month, day
}
24 Returns the day of the week (
\code{0} is Monday) for
\var{year
}
25 (
\code{1970}--
\ldots),
\var{month
} (
\code{1}--
\code{12}),
\var{day
}
26 (
\code{1}--
\code{31}).
29 \begin{funcdesc
}{monthrange
}{year, month
}
30 Returns weekday of first day of the month and number of days in month,
31 for the specified
\var{year
} and
\var{month
}.
34 \begin{funcdesc
}{monthcalendar
}{year, month
}
35 Returns a matrix representing a month's calendar. Each row represents
36 a week; days outside of the month a represented by zeros.
39 \begin{funcdesc
}{prmonth
}{year, month
\optional{, width
\optional{, length
}}}
40 Prints a month's calendar. If
\var{width
} is provided, it specifies
41 the width of the columns that the numbers are centered in. If
42 \var{length
} is given, it specifies the number of lines that each
46 \begin{funcdesc
}{prcal
}{year
}
47 Prints the calendar for the year
\var{year
}.