⚠️ Internal Docs ⚠️ Not Public API πŸ‘‰ Official Docs Here

Module datetime

Source
Available on non-Py_LIMITED_API only.
Expand description

Safe Rust wrappers for types defined in the Python datetime library

For more details about these types, see the Python documentation

Macros§

ffi_fun_with_autoinit πŸ”’

Structs§

PyDate
Bindings around datetime.date.
PyDateTime
Bindings for datetime.datetime.
PyDelta
Bindings for datetime.timedelta.
PyTime
Bindings for datetime.time.
PyTzInfo
Bindings for datetime.tzinfo.

Traits§

PyDateAccess
Trait for accessing the date components of a struct containing a date.
PyDeltaAccess
Trait for accessing the components of a struct containing a timedelta.
PyTimeAccess
Trait for accessing the time components of a struct containing a time.
PyTzInfoAccess
Trait for accessing the components of a struct containing a tzinfo.

Functions§

PyDateTime_Check πŸ”’ ⚠
Check if op is a PyDateTimeAPI.DateTimeType or subtype.
PyDate_Check πŸ”’ ⚠
Check if op is a PyDateTimeAPI.DateType or subtype.
PyDelta_Check πŸ”’ ⚠
Check if op is a PyDateTimeAPI.DetaType or subtype.
PyTZInfo_Check πŸ”’ ⚠
Check if op is a PyDateTimeAPI.TZInfoType or subtype.
PyTime_Check πŸ”’ ⚠
Check if op is a PyDateTimeAPI.TimeType or subtype.
ensure_datetime_api πŸ”’
expect_datetime_api πŸ”’
opt_to_pyobj πŸ”’
timezone_from_offset πŸ”’ chrono or jiff-02
Equivalent to datetime.timezone constructor
timezone_utc
Equivalent to datetime.timezone.utc
timezone_utc_boundDeprecated
Deprecated name for timezone_utc.