summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/datetime.rst
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2022-07-14 00:40:10 (GMT)
committerGitHub <noreply@github.com>2022-07-14 00:40:10 (GMT)
commit967da5febbc77b36a5b14863e61db3a2d441a940 (patch)
treee4891e876dd51da2ba3d72ab5b37462f4a3b0455 /Doc/c-api/datetime.rst
parent07374cce52abb7fd39729dc1b646ca3029b64c64 (diff)
downloadcpython-967da5febbc77b36a5b14863e61db3a2d441a940.zip
cpython-967da5febbc77b36a5b14863e61db3a2d441a940.tar.gz
cpython-967da5febbc77b36a5b14863e61db3a2d441a940.tar.bz2
gh-90359: Unify documentation style for datetime.rst (gh-94836)
Diffstat (limited to 'Doc/c-api/datetime.rst')
-rw-r--r--Doc/c-api/datetime.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/c-api/datetime.rst b/Doc/c-api/datetime.rst
index d650f55..72fc07a 100644
--- a/Doc/c-api/datetime.rst
+++ b/Doc/c-api/datetime.rst
@@ -132,6 +132,7 @@ Macros to create objects:
resulting number of microseconds and seconds lie in the ranges documented for
:class:`datetime.timedelta` objects.
+
.. c:function:: PyObject* PyTimeZone_FromOffset(PyDateTime_DeltaType* offset)
Return a :class:`datetime.timezone` object with an unnamed fixed offset
@@ -139,6 +140,7 @@ Macros to create objects:
.. versionadded:: 3.7
+
.. c:function:: PyObject* PyTimeZone_FromOffsetAndName(PyDateTime_DeltaType* offset, PyUnicode* name)
Return a :class:`datetime.timezone` object with a fixed offset represented
@@ -190,18 +192,21 @@ must not be ``NULL``, and the type is not checked:
Return the microsecond, as an int from 0 through 999999.
+
.. c:function:: int PyDateTime_DATE_GET_FOLD(PyDateTime_DateTime *o)
Return the fold, as an int from 0 through 1.
.. versionadded:: 3.6
+
.. c:function:: PyObject* PyDateTime_DATE_GET_TZINFO(PyDateTime_DateTime *o)
Return the tzinfo (which may be ``None``).
.. versionadded:: 3.10
+
Macros to extract fields from time objects. The argument must be an instance of
:c:data:`PyDateTime_Time`, including subclasses. The argument must not be ``NULL``,
and the type is not checked:
@@ -225,12 +230,14 @@ and the type is not checked:
Return the microsecond, as an int from 0 through 999999.
+
.. c:function:: int PyDateTime_TIME_GET_FOLD(PyDateTime_Time *o)
Return the fold, as an int from 0 through 1.
.. versionadded:: 3.6
+
.. c:function:: PyObject* PyDateTime_TIME_GET_TZINFO(PyDateTime_Time *o)
Return the tzinfo (which may be ``None``).