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 PyPy
norGraalPy
- _PyDate
Time_ ๐GET_ HOUR Neither PyPy
norGraalPy
- _PyDate
Time_ ๐GET_ MICROSECOND Neither PyPy
norGraalPy
- _PyDate
Time_ ๐GET_ MINUTE Neither PyPy
norGraalPy
- _PyDate
Time_ ๐GET_ SECOND Neither PyPy
norGraalPy
- _PyDate
Time_ ๐GET_ TZINFO Neither PyPy
norGraalPy
- _access_
delta_ ๐field Neither PyPy
norGraalPy
- _access_
field ๐Neither PyPy
norGraalPy
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 PyPy
norGraalPy
- Structure representing a
datetime.datetime
without atzinfo
member. - _PyDate
Time_ Base Time Neither PyPy
norGraalPy
- Structure representing a
datetime.time
without atzinfo
member.
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_CAPI
instance - PyDate
Time_ โCheck - Check if
op
is aPyDateTimeAPI.DateTimeType
or subtype. - PyDate
Time_ โCheck Exact - Check if
op
โs type is exactlyPyDateTimeAPI.DateTimeType
. - PyDate
Time_ โDATE_ GET_ FOLD Neither PyPy
norGraalPy
- Retrieve the fold component of a
PyDateTime_DateTime
. Returns a signed integer in the interval[0, 1]
- PyDate
Time_ โDATE_ GET_ HOUR Neither PyPy
norGraalPy
- Retrieve the hour component of a
PyDateTime_DateTime
. Returns a signed integer in the interval[0, 23]
- PyDate
Time_ โDATE_ GET_ MICROSECOND Neither PyPy
norGraalPy
- Retrieve the microsecond component of a
PyDateTime_DateTime
. Returns a signed integer in the interval[0, 999999]
- PyDate
Time_ โDATE_ GET_ MINUTE Neither PyPy
norGraalPy
- Retrieve the minute component of a
PyDateTime_DateTime
. Returns a signed integer in the interval[0, 59]
- PyDate
Time_ โDATE_ GET_ SECOND Neither PyPy
norGraalPy
- Retrieve the second component of a
PyDateTime_DateTime
. Returns a signed integer in the interval[0, 59]
- PyDate
Time_ โDATE_ GET_ TZINFO Neither PyPy
norGraalPy
- Retrieve the tzinfo component of a
PyDateTime_DateTime
. Returns a pointer to aPyObject
that should be either NULL or an instance of adatetime.tzinfo
subclass. - PyDate
Time_ โDELTA_ GET_ DAYS Neither PyPy
norGraalPy
- Retrieve the days component of a
PyDateTime_Delta
. - PyDate
Time_ โDELTA_ GET_ MICROSECONDS Neither PyPy
norGraalPy
- Retrieve the seconds component of a
PyDateTime_Delta
. - PyDate
Time_ โDELTA_ GET_ SECONDS Neither PyPy
norGraalPy
- Retrieve the seconds component of a
PyDateTime_Delta
. - PyDate
Time_ โFrom Timestamp Non- PyPy
- PyDate
Time_ โGET_ DAY Neither PyPy
norGraalPy
- Retrieve the day component of a
PyDateTime_Date
orPyDateTime_DateTime
. Returns a signed integer in the interval[1, 31]
. - PyDate
Time_ โGET_ MONTH Neither PyPy
norGraalPy
- Retrieve the month component of a
PyDateTime_Date
orPyDateTime_DateTime
. Returns a signed integer in the range[1, 12]
. - PyDate
Time_ โGET_ YEAR Neither PyPy
norGraalPy
- Retrieve the year component of a
PyDateTime_Date
orPyDateTime_DateTime
. Returns a signed integer greater than 0. - PyDate
Time_ โIMPORT - Populates the
PyDateTimeAPI
object - PyDate
Time_ โTIME_ GET_ FOLD Neither PyPy
norGraalPy
- Retrieve the fold component of a
PyDateTime_Time
. Returns a signed integer in the interval[0, 1]
- PyDate
Time_ โTIME_ GET_ HOUR Neither PyPy
norGraalPy
- Retrieve the hour component of a
PyDateTime_Time
. Returns a signed integer in the interval[0, 23]
- PyDate
Time_ โTIME_ GET_ MICROSECOND Neither PyPy
norGraalPy
- Retrieve the microsecond component of a
PyDateTime_DateTime
. Returns a signed integer in the interval[0, 999999]
- PyDate
Time_ โTIME_ GET_ MINUTE Neither PyPy
norGraalPy
- Retrieve the minute component of a
PyDateTime_Time
. Returns a signed integer in the interval[0, 59]
- PyDate
Time_ โTIME_ GET_ SECOND Neither PyPy
norGraalPy
- Retrieve the second component of a
PyDateTime_DateTime
. Returns a signed integer in the interval[0, 59]
- PyDate
Time_ โTIME_ GET_ TZINFO Neither PyPy
norGraalPy
- Retrieve the tzinfo component of a
PyDateTime_Time
. Returns a pointer to aPyObject
that should be either NULL or an instance of adatetime.tzinfo
subclass. - 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
op
is aPyDateTimeAPI.DetaType
or subtype. - PyDelta_
Check โExact - Check if
op
โs type is exactlyPyDateTimeAPI.DeltaType
. - PyTZ
Info_ โCheck - Check if
op
is aPyDateTimeAPI.TZInfoType
or 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
op
is aPyDateTimeAPI.TimeType
or subtype. - PyTime_
Check โExact - Check if
op
โs type is exactlyPyDateTimeAPI.TimeType
.