Available on non-
Py_LIMITED_API only.Expand description
FFI bindings to the functions and structs defined in datetime.h
This is the unsafe thin wrapper around the CPython C API,
and covers the various date and time related objects in the Python datetime
standard library module.
Macrosยง
- _PyDate
Time_ ๐GET_ FOLD Neither PyPynorGraalPy - _PyDate
Time_ ๐GET_ HOUR Neither PyPynorGraalPy - _PyDate
Time_ ๐GET_ MICROSECOND Neither PyPynorGraalPy - _PyDate
Time_ ๐GET_ MINUTE Neither PyPynorGraalPy - _PyDate
Time_ ๐GET_ SECOND Neither PyPynorGraalPy - _PyDate
Time_ ๐GET_ TZINFO Neither PyPynorGraalPy - _access_
delta_ ๐field Neither PyPynorGraalPy - _access_
field ๐Neither PyPynorGraalPy
Structsยง
- PyDate
TimeAPI ๐Singleton - PyDate
Time_ CAPI - PyDate
Time_ Date - Structure representing a
datetime.date - PyDate
Time_ Date Time - Structure representing a
datetime.datetime. - PyDate
Time_ Delta - Structure representing a
datetime.timedelta. - PyDate
Time_ Time - Structure representing a
datetime.time. - _PyDate
Time_ Base Date Time Neither PyPynorGraalPy - Structure representing a
datetime.datetimewithout atzinfomember. - _PyDate
Time_ Base Time Neither PyPynorGraalPy - Structure representing a
datetime.timewithout atzinfomember.
Constantsยง
- PyDate
Time_ CAPSULE_ NAME - _PyDate
Time_ ๐DATETIME_ DATASIZE - _PyDate
Time_ ๐DATE_ DATASIZE - _PyDate
Time_ ๐TIME_ DATASIZE
Staticsยง
- PyDate
TimeAPI_ ๐impl
Functionsยง
- PyDate
TimeAPI โ - Returns a pointer to a
PyDateTime_CAPIinstance - PyDate
Time_ โCheck - Check if
opis aPyDateTimeAPI.DateTimeTypeor subtype. - PyDate
Time_ โCheck Exact - Check if
opโs type is exactlyPyDateTimeAPI.DateTimeType. - PyDate
Time_ โDATE_ GET_ FOLD Neither PyPynorGraalPy - Retrieve the fold component of a
PyDateTime_DateTime. Returns a signed integer in the interval[0, 1] - PyDate
Time_ โDATE_ GET_ HOUR Neither PyPynorGraalPy - Retrieve the hour component of a
PyDateTime_DateTime. Returns a signed integer in the interval[0, 23] - PyDate
Time_ โDATE_ GET_ MICROSECOND Neither PyPynorGraalPy - Retrieve the microsecond component of a
PyDateTime_DateTime. Returns a signed integer in the interval[0, 999999] - PyDate
Time_ โDATE_ GET_ MINUTE Neither PyPynorGraalPy - Retrieve the minute component of a
PyDateTime_DateTime. Returns a signed integer in the interval[0, 59] - PyDate
Time_ โDATE_ GET_ SECOND Neither PyPynorGraalPy - Retrieve the second component of a
PyDateTime_DateTime. Returns a signed integer in the interval[0, 59] - PyDate
Time_ โDATE_ GET_ TZINFO Neither PyPynorGraalPy - Retrieve the tzinfo component of a
PyDateTime_DateTime. Returns a pointer to aPyObjectthat should be either NULL or an instance of adatetime.tzinfosubclass. - PyDate
Time_ โDELTA_ GET_ DAYS Neither PyPynorGraalPy - Retrieve the days component of a
PyDateTime_Delta. - PyDate
Time_ โDELTA_ GET_ MICROSECONDS Neither PyPynorGraalPy - Retrieve the seconds component of a
PyDateTime_Delta. - PyDate
Time_ โDELTA_ GET_ SECONDS Neither PyPynorGraalPy - Retrieve the seconds component of a
PyDateTime_Delta. - PyDate
Time_ โFrom Timestamp Non- PyPy - PyDate
Time_ โGET_ DAY Neither PyPynorGraalPy - Retrieve the day component of a
PyDateTime_DateorPyDateTime_DateTime. Returns a signed integer in the interval[1, 31]. - PyDate
Time_ โGET_ MONTH Neither PyPynorGraalPy - Retrieve the month component of a
PyDateTime_DateorPyDateTime_DateTime. Returns a signed integer in the range[1, 12]. - PyDate
Time_ โGET_ YEAR Neither PyPynorGraalPy - Retrieve the year component of a
PyDateTime_DateorPyDateTime_DateTime. Returns a signed integer greater than 0. - PyDate
Time_ โIMPORT - Populates the
PyDateTimeAPIobject - PyDate
Time_ โTIME_ GET_ FOLD Neither PyPynorGraalPy - Retrieve the fold component of a
PyDateTime_Time. Returns a signed integer in the interval[0, 1] - PyDate
Time_ โTIME_ GET_ HOUR Neither PyPynorGraalPy - Retrieve the hour component of a
PyDateTime_Time. Returns a signed integer in the interval[0, 23] - PyDate
Time_ โTIME_ GET_ MICROSECOND Neither PyPynorGraalPy - Retrieve the microsecond component of a
PyDateTime_DateTime. Returns a signed integer in the interval[0, 999999] - PyDate
Time_ โTIME_ GET_ MINUTE Neither PyPynorGraalPy - Retrieve the minute component of a
PyDateTime_Time. Returns a signed integer in the interval[0, 59] - PyDate
Time_ โTIME_ GET_ SECOND Neither PyPynorGraalPy - Retrieve the second component of a
PyDateTime_DateTime. Returns a signed integer in the interval[0, 59] - PyDate
Time_ โTIME_ GET_ TZINFO Neither PyPynorGraalPy - Retrieve the tzinfo component of a
PyDateTime_Time. Returns a pointer to aPyObjectthat should be either NULL or an instance of adatetime.tzinfosubclass. - PyDate
Time_ โTime Zone_ UTC - PyDate_
Check โ - Type Check macros
- PyDate_
Check โExact - Check if
opโs type is exactlyPyDateTimeAPI.DateType. - PyDate_
From โTimestamp Non- PyPy - PyDelta_
Check โ - Check if
opis aPyDateTimeAPI.DetaTypeor subtype. - PyDelta_
Check โExact - Check if
opโs type is exactlyPyDateTimeAPI.DeltaType. - PyTZ
Info_ โCheck - Check if
opis aPyDateTimeAPI.TZInfoTypeor subtype. - PyTZ
Info_ โCheck Exact - Check if
opโs type is exactlyPyDateTimeAPI.TZInfoType. - PyTime
Zone_ โFrom Offset - PyTime
Zone_ โFrom Offset AndName - PyTime_
Check โ - Check if
opis aPyDateTimeAPI.TimeTypeor subtype. - PyTime_
Check โExact - Check if
opโs type is exactlyPyDateTimeAPI.TimeType.