summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-06-13 01:36:42 +0000
committerFred Drake <fdrake@acm.org>2002-06-13 01:36:42 +0000
commit22d7d613fb0c7e8a1bcf8b1f3969704353661e2a (patch)
treee51f1779a8a4a5a0badb9c94d9034dbfe9b68d04
parent95fd7f922ca7547349e5789c2869e39ca32c8362 (diff)
downloadcpython-22d7d613fb0c7e8a1bcf8b1f3969704353661e2a.tar.gz
Add version annotations for some older changes to the calendar module.
Closes SF patch #567867. Added a couple of minor clarifications present in the 2.2.x and 2.3 version of the documentation which also apply to 2.1.x.
-rw-r--r--Doc/lib/libcalendar.tex12
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/lib/libcalendar.tex b/Doc/lib/libcalendar.tex
index c6ca67fee3..3c76962585 100644
--- a/Doc/lib/libcalendar.tex
+++ b/Doc/lib/libcalendar.tex
@@ -25,10 +25,12 @@ convenience. For example, to set the first weekday to Sunday:
import calendar
calendar.setfirstweekday(calendar.SUNDAY)
\end{verbatim}
+\versionadded{2.0}
\end{funcdesc}
\begin{funcdesc}{firstweekday}{}
Returns the current setting for the weekday to start each week.
+\versionadded{2.0}
\end{funcdesc}
\begin{funcdesc}{isleap}{year}
@@ -37,7 +39,9 @@ Returns true if \var{year} is a leap year.
\begin{funcdesc}{leapdays}{y1, y2}
Returns the number of leap years in the range
-[\var{y1}\ldots\var{y2}).
+[\var{y1}\ldots\var{y2}), where \var{y1} and \var{y2} are years.
+\versionchanged[This function didn't work for ranges spanning
+ a century change in Python 1.5.2]{2.0}
\end{funcdesc}
\begin{funcdesc}{weekday}{year, month, day}
@@ -67,6 +71,7 @@ provided, it specifies the width of the date columns, which are
centered. If \var{l} is given, it specifies the number of lines that
each week will use. Depends on the first weekday as set by
\function{setfirstweekday()}.
+\versionadded{2.0}
\end{funcdesc}
\begin{funcdesc}{prcal}{year\optional{, w\optional{, l\optional{c}}}}
@@ -79,7 +84,9 @@ Returns a 3-column calendar for an entire year as a multi-line string.
Optional parameters \var{w}, \var{l}, and \var{c} are for date column
width, lines per week, and number of spaces between month columns,
respectively. Depends on the first weekday as set by
-\function{setfirstweekday()}.
+\function{setfirstweekday()}. The earliest year for which a calendar can
+be generated is platform-dependent.
+\versionadded{2.0}
\end{funcdesc}
\begin{funcdesc}{timegm}{tuple}
@@ -88,6 +95,7 @@ returned by the \function{gmtime()} function in the \refmodule{time}
module, and returns the corresponding Unix timestamp value, assuming
an epoch of 1970, and the POSIX encoding. In fact,
\function{time.gmtime()} and \function{timegm()} are each others' inverse.
+\versionadded{2.0}
\end{funcdesc}