summaryrefslogtreecommitdiffstats
path: root/Doc/library/time.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-09-01 13:51:09 (GMT)
committerGeorg Brandl <georg@python.org>2007-09-01 13:51:09 (GMT)
commit55ac8f0f26efdbbcb5cc197f9369d23d50bee908 (patch)
treea0d5b7128c055d8c767652dc3948c3404be06396 /Doc/library/time.rst
parent1617457cff847fed9fadb01f1acf6ba8bb621726 (diff)
downloadcpython-55ac8f0f26efdbbcb5cc197f9369d23d50bee908.zip
cpython-55ac8f0f26efdbbcb5cc197f9369d23d50bee908.tar.gz
cpython-55ac8f0f26efdbbcb5cc197f9369d23d50bee908.tar.bz2
Get rid of the remaining versionadded/versionchanged directives.
Diffstat (limited to 'Doc/library/time.rst')
-rw-r--r--Doc/library/time.rst192
1 files changed, 78 insertions, 114 deletions
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
index 04c8f66..1907011 100644
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -115,10 +115,6 @@ An explanation of some terminology and conventions is in order.
:class:`struct_time`, or having elements of the wrong type, a :exc:`TypeError`
is raised.
- .. versionchanged:: 2.2
- The time value sequence was changed from a tuple to a :class:`struct_time`, with
- the addition of attribute names for the fields.
-
The module defines the following functions and data items:
@@ -149,9 +145,6 @@ The module defines the following functions and data items:
Unlike the C function of the same name, there is no trailing newline.
- .. versionchanged:: 2.1
- Allowed *t* to be omitted.
-
.. function:: clock()
@@ -178,12 +171,6 @@ The module defines the following functions and data items:
returned by :func:`time` is used. ``ctime(secs)`` is equivalent to
``asctime(localtime(secs))``. Locale information is not used by :func:`ctime`.
- .. versionchanged:: 2.1
- Allowed *secs* to be omitted.
-
- .. versionchanged:: 2.4
- If *secs* is :const:`None`, the current time is used.
-
.. data:: daylight
@@ -199,12 +186,6 @@ The module defines the following functions and data items:
:class:`struct_time` object. See :func:`calendar.timegm` for the inverse of this
function.
- .. versionchanged:: 2.1
- Allowed *secs* to be omitted.
-
- .. versionchanged:: 2.4
- If *secs* is :const:`None`, the current time is used.
-
.. function:: localtime([secs])
@@ -212,12 +193,6 @@ The module defines the following functions and data items:
:const:`None`, the current time as returned by :func:`time` is used. The dst
flag is set to ``1`` when DST applies to the given time.
- .. versionchanged:: 2.1
- Allowed *secs* to be omitted.
-
- .. versionchanged:: 2.4
- If *secs* is :const:`None`, the current time is used.
-
.. function:: mktime(t)
@@ -249,96 +224,89 @@ The module defines the following functions and data items:
:func:`localtime` is used. *format* must be a string. :exc:`ValueError` is
raised if any field in *t* is outside of the allowed range.
- .. versionchanged:: 2.1
- Allowed *t* to be omitted.
-
- .. versionchanged:: 2.4
- :exc:`ValueError` raised if a field in *t* is out of range.
-
- .. versionchanged:: 2.5
- 0 is now a legal argument for any position in the time tuple; if it is normally
- illegal the value is forced to a correct one..
+ 0 is a legal argument for any position in the time tuple; if it is normally
+ illegal the value is forced to a correct one.
The following directives can be embedded in the *format* string. They are shown
without the optional field width and precision specification, and are replaced
by the indicated characters in the :func:`strftime` result:
- +-----------+--------------------------------+-------+
- | Directive | Meaning | Notes |
- +===========+================================+=======+
- | ``%a`` | Locale's abbreviated weekday | |
- | | name. | |
- +-----------+--------------------------------+-------+
- | ``%A`` | Locale's full weekday name. | |
- +-----------+--------------------------------+-------+
- | ``%b`` | Locale's abbreviated month | |
- | | name. | |
- +-----------+--------------------------------+-------+
- | ``%B`` | Locale's full month name. | |
- +-----------+--------------------------------+-------+
- | ``%c`` | Locale's appropriate date and | |
- | | time representation. | |
- +-----------+--------------------------------+-------+
- | ``%d`` | Day of the month as a decimal | |
- | | number [01,31]. | |
- +-----------+--------------------------------+-------+
- | ``%H`` | Hour (24-hour clock) as a | |
- | | decimal number [00,23]. | |
- +-----------+--------------------------------+-------+
- | ``%I`` | Hour (12-hour clock) as a | |
- | | decimal number [01,12]. | |
- +-----------+--------------------------------+-------+
- | ``%j`` | Day of the year as a decimal | |
- | | number [001,366]. | |
- +-----------+--------------------------------+-------+
- | ``%m`` | Month as a decimal number | |
- | | [01,12]. | |
- +-----------+--------------------------------+-------+
- | ``%M`` | Minute as a decimal number | |
- | | [00,59]. | |
- +-----------+--------------------------------+-------+
- | ``%p`` | Locale's equivalent of either | \(1) |
- | | AM or PM. | |
- +-----------+--------------------------------+-------+
- | ``%S`` | Second as a decimal number | \(2) |
- | | [00,61]. | |
- +-----------+--------------------------------+-------+
- | ``%U`` | Week number of the year | \(3) |
- | | (Sunday as the first day of | |
- | | the week) as a decimal number | |
- | | [00,53]. All days in a new | |
- | | year preceding the first | |
- | | Sunday are considered to be in | |
- | | week 0. | |
- +-----------+--------------------------------+-------+
- | ``%w`` | Weekday as a decimal number | |
- | | [0(Sunday),6]. | |
- +-----------+--------------------------------+-------+
- | ``%W`` | Week number of the year | \(3) |
- | | (Monday as the first day of | |
- | | the week) as a decimal number | |
- | | [00,53]. All days in a new | |
- | | year preceding the first | |
- | | Monday are considered to be in | |
- | | week 0. | |
- +-----------+--------------------------------+-------+
- | ``%x`` | Locale's appropriate date | |
- | | representation. | |
- +-----------+--------------------------------+-------+
- | ``%X`` | Locale's appropriate time | |
- | | representation. | |
- +-----------+--------------------------------+-------+
- | ``%y`` | Year without century as a | |
- | | decimal number [00,99]. | |
- +-----------+--------------------------------+-------+
- | ``%Y`` | Year with century as a decimal | |
- | | number. | |
- +-----------+--------------------------------+-------+
- | ``%Z`` | Time zone name (no characters | |
- | | if no time zone exists). | |
- +-----------+--------------------------------+-------+
- | ``%%`` | A literal ``'%'`` character. | |
- +-----------+--------------------------------+-------+
+ +-----------+------------------------------------------------+-------+
+ | Directive | Meaning | Notes |
+ +===========+================================================+=======+
+ | ``%a`` | Locale's abbreviated weekday name. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%A`` | Locale's full weekday name. | |
+ +-----------+------------------------------------------------+-------+
+ | ``%b`` | Locale's abbreviated month name. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%B`` | Locale's full month name. | |
+ +-----------+------------------------------------------------+-------+
+ | ``%c`` | Locale's appropriate date and time | |
+ | | representation. | |
+ +-----------+------------------------------------------------+-------+
+ | ``%d`` | Day of the month as a decimal number [01,31]. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%H`` | Hour (24-hour clock) as a decimal number | |
+ | | [00,23]. | |
+ +-----------+------------------------------------------------+-------+
+ | ``%I`` | Hour (12-hour clock) as a decimal number | |
+ | | [01,12]. | |
+ +-----------+------------------------------------------------+-------+
+ | ``%j`` | Day of the year as a decimal number [001,366]. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%m`` | Month as a decimal number [01,12]. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%M`` | Minute as a decimal number [00,59]. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%p`` | Locale's equivalent of either AM or PM. | \(1) |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%S`` | Second as a decimal number [00,61]. | \(2) |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%U`` | Week number of the year (Sunday as the first | \(3) |
+ | | day of the week) as a decimal number [00,53]. | |
+ | | All days in a new year preceding the first | |
+ | | Sunday are considered to be in week 0. | |
+ | | | |
+ | | | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%w`` | Weekday as a decimal number [0(Sunday),6]. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%W`` | Week number of the year (Monday as the first | \(3) |
+ | | day of the week) as a decimal number [00,53]. | |
+ | | All days in a new year preceding the first | |
+ | | Monday are considered to be in week 0. | |
+ | | | |
+ | | | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%x`` | Locale's appropriate date representation. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%X`` | Locale's appropriate time representation. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%y`` | Year without century as a decimal number | |
+ | | [00,99]. | |
+ +-----------+------------------------------------------------+-------+
+ | ``%Y`` | Year with century as a decimal number. | |
+ | | | |
+ +-----------+------------------------------------------------+-------+
+ | ``%Z`` | Time zone name (no characters if no time zone | |
+ | | exists). | |
+ +-----------+------------------------------------------------+-------+
+ | ``%%`` | A literal ``'%'`` character. | |
+ +-----------+------------------------------------------------+-------+
Notes:
@@ -405,8 +373,6 @@ The module defines the following functions and data items:
The type of the time value sequence returned by :func:`gmtime`,
:func:`localtime`, and :func:`strptime`.
- .. versionadded:: 2.2
-
.. function:: time()
@@ -436,8 +402,6 @@ The module defines the following functions and data items:
Resets the time conversion rules used by the library routines. The environment
variable :envvar:`TZ` specifies how this is done.
- .. versionadded:: 2.3
-
Availability: Unix.
.. note::