summaryrefslogtreecommitdiffstats
path: root/Doc/library/calendar.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/calendar.rst')
-rw-r--r--Doc/library/calendar.rst24
1 files changed, 1 insertions, 23 deletions
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index aa13c81..e125ccc 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -32,11 +32,9 @@ it's the base calendar for all computations.
preparing the calendar data for formatting. This class doesn't do any formatting
itself. This is the job of subclasses.
- .. versionadded:: 2.5
:class:`Calendar` instances have the following methods:
-
.. method:: Calendar.iterweekdays(weekday)
Return an iterator for the week day numbers that will be used for one week. The
@@ -109,11 +107,9 @@ it's the base calendar for all computations.
This class can be used to generate plain text calendars.
- .. versionadded:: 2.5
:class:`TextCalendar` instances have the following methods:
-
.. method:: TextCalendar.formatmonth(theyear, themonth[, w[, l]])
Return a month's calendar in a multi-line string. If *w* is provided, it
@@ -145,11 +141,9 @@ it's the base calendar for all computations.
This class can be used to generate HTML calendars.
- .. versionadded:: 2.5
:class:`HTMLCalendar` instances have the following methods:
-
.. method:: HTMLCalendar.formatmonth(theyear, themonth[, withyear])
Return a month's calendar as an HTML table. If *withyear* is true the year will
@@ -178,8 +172,6 @@ it's the base calendar for all computations.
this locale includes an encoding all strings containing month and weekday names
will be returned as unicode.
- .. versionadded:: 2.5
-
.. class:: LocaleHTMLCalendar([firstweekday[, locale]])
@@ -188,11 +180,9 @@ it's the base calendar for all computations.
this locale includes an encoding all strings containing month and weekday names
will be returned as unicode.
- .. versionadded:: 2.5
For simple text calendars this module provides the following functions.
-
.. function:: setfirstweekday(weekday)
Sets the weekday (``0`` is Monday, ``6`` is Sunday) to start each week. The
@@ -203,15 +193,11 @@ For simple text calendars this module provides the following functions.
import calendar
calendar.setfirstweekday(calendar.SUNDAY)
- .. versionadded:: 2.0
-
.. function:: firstweekday()
Returns the current setting for the weekday to start each week.
- .. versionadded:: 2.0
-
.. function:: isleap(year)
@@ -223,9 +209,7 @@ For simple text calendars this module provides the following functions.
Returns the number of leap years in the range from *y1* to *y2* (exclusive),
where *y1* and *y2* are years.
- .. versionchanged:: 2.0
- This function didn't work for ranges spanning a century change in Python
- 1.5.2.
+ This function works for ranges spanning a century change.
.. function:: weekday(year, month, day)
@@ -263,8 +247,6 @@ For simple text calendars this module provides the following functions.
Returns a month's calendar in a multi-line string using the :meth:`formatmonth`
of the :class:`TextCalendar` class.
- .. versionadded:: 2.0
-
.. function:: prcal(year[, w[, l[c]]])
@@ -276,8 +258,6 @@ For simple text calendars this module provides the following functions.
Returns a 3-column calendar for an entire year as a multi-line string using the
:meth:`formatyear` of the :class:`TextCalendar` class.
- .. versionadded:: 2.0
-
.. function:: timegm(tuple)
@@ -286,11 +266,9 @@ For simple text calendars this module provides the following functions.
Unix timestamp value, assuming an epoch of 1970, and the POSIX encoding. In
fact, :func:`time.gmtime` and :func:`timegm` are each others' inverse.
- .. versionadded:: 2.0
The :mod:`calendar` module exports the following data attributes:
-
.. data:: day_name
An array that represents the days of the week in the current locale.