diff options
author | Zackery Spytz <zspytz@gmail.com> | 2020-09-23 18:43:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 18:43:45 (GMT) |
commit | 2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5 (patch) | |
tree | 7b8e1b98c94d77ffcdcfc61645c6b40f5ebd44ab /Doc/c-api/datetime.rst | |
parent | 9c4eac7f02ddcf32fc1cdaf7c08c37fe9718c1fb (diff) | |
download | cpython-2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5.zip cpython-2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5.tar.gz cpython-2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5.tar.bz2 |
bpo-30155: Add macros to get tzinfo from datetime instances (GH-21633)
Add PyDateTime_DATE_GET_TZINFO() and PyDateTime_TIME_GET_TZINFO()
macros.
Diffstat (limited to 'Doc/c-api/datetime.rst')
-rw-r--r-- | Doc/c-api/datetime.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/c-api/datetime.rst b/Doc/c-api/datetime.rst index bd4f1ff..415ce4c 100644 --- a/Doc/c-api/datetime.rst +++ b/Doc/c-api/datetime.rst @@ -185,6 +185,11 @@ must not be ``NULL``, and the type is not checked: Return the microsecond, as an int from 0 through 999999. +.. 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``, @@ -209,6 +214,12 @@ and the type is not checked: Return the microsecond, as an int from 0 through 999999. +.. c:function:: PyObject* PyDateTime_TIME_GET_TZINFO(PyDateTime_Time *o) + + Return the tzinfo (which may be ``None``). + + .. versionadded:: 3.10 + Macros to extract fields from time delta objects. The argument must be an instance of :c:data:`PyDateTime_Delta`, including subclasses. The argument must |