mirror of https://github.com/python/cpython.git
[3.11] Fix more references to datetime and time classes (GH-114717) (GH-114726)
They could be confused with references to datetime and time modules.
(cherry picked from commit 39c766b579
)
This commit is contained in:
parent
55bddca133
commit
3dd3b301b6
|
@ -1664,7 +1664,7 @@ Usage of ``KabulTz`` from above::
|
||||||
:class:`.time` Objects
|
:class:`.time` Objects
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
A :class:`time` object represents a (local) time of day, independent of any particular
|
A :class:`.time` object represents a (local) time of day, independent of any particular
|
||||||
day, and subject to adjustment via a :class:`tzinfo` object.
|
day, and subject to adjustment via a :class:`tzinfo` object.
|
||||||
|
|
||||||
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
|
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
|
||||||
|
@ -2497,7 +2497,7 @@ information, which are supported in ``datetime.strptime`` but are discarded by
|
||||||
``time.strptime``.
|
``time.strptime``.
|
||||||
|
|
||||||
For :class:`.time` objects, the format codes for year, month, and day should not
|
For :class:`.time` objects, the format codes for year, month, and day should not
|
||||||
be used, as :class:`time` objects have no such values. If they're used anyway,
|
be used, as :class:`!time` objects have no such values. If they're used anyway,
|
||||||
``1900`` is substituted for the year, and ``1`` for the month and day.
|
``1900`` is substituted for the year, and ``1`` for the month and day.
|
||||||
|
|
||||||
For :class:`date` objects, the format codes for hours, minutes, seconds, and
|
For :class:`date` objects, the format codes for hours, minutes, seconds, and
|
||||||
|
|
|
@ -1027,8 +1027,8 @@ When a :class:`!MaildirMessage` instance is created based upon a
|
||||||
leading "From " or trailing newline. For convenience, *time_* may be
|
leading "From " or trailing newline. For convenience, *time_* may be
|
||||||
specified and will be formatted appropriately and appended to *from_*. If
|
specified and will be formatted appropriately and appended to *from_*. If
|
||||||
*time_* is specified, it should be a :class:`time.struct_time` instance, a
|
*time_* is specified, it should be a :class:`time.struct_time` instance, a
|
||||||
tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
|
tuple suitable for passing to :func:`time.strftime`, or ``True`` (to use
|
||||||
:meth:`time.gmtime`).
|
:func:`time.gmtime`).
|
||||||
|
|
||||||
|
|
||||||
.. method:: get_flags()
|
.. method:: get_flags()
|
||||||
|
@ -1399,8 +1399,8 @@ When a :class:`!BabylMessage` instance is created based upon an
|
||||||
leading "From " or trailing newline. For convenience, *time_* may be
|
leading "From " or trailing newline. For convenience, *time_* may be
|
||||||
specified and will be formatted appropriately and appended to *from_*. If
|
specified and will be formatted appropriately and appended to *from_*. If
|
||||||
*time_* is specified, it should be a :class:`time.struct_time` instance, a
|
*time_* is specified, it should be a :class:`time.struct_time` instance, a
|
||||||
tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
|
tuple suitable for passing to :func:`time.strftime`, or ``True`` (to use
|
||||||
:meth:`time.gmtime`).
|
:func:`time.gmtime`).
|
||||||
|
|
||||||
|
|
||||||
.. method:: get_flags()
|
.. method:: get_flags()
|
||||||
|
|
|
@ -754,8 +754,8 @@ datetime
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Added new alternate constructors :meth:`datetime.date.fromisocalendar` and
|
Added new alternate constructors :meth:`datetime.date.fromisocalendar` and
|
||||||
:meth:`datetime.datetime.fromisocalendar`, which construct :class:`date` and
|
:meth:`datetime.datetime.fromisocalendar`, which construct :class:`~datetime.date` and
|
||||||
:class:`datetime` objects respectively from ISO year, week number, and weekday;
|
:class:`~datetime.datetime` objects respectively from ISO year, week number, and weekday;
|
||||||
these are the inverse of each class's ``isocalendar`` method.
|
these are the inverse of each class's ``isocalendar`` method.
|
||||||
(Contributed by Paul Ganssle in :issue:`36004`.)
|
(Contributed by Paul Ganssle in :issue:`36004`.)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue