deimos.python.datetime

mirror datetime.h

Members

Functions

PyDateTime_Check
int PyDateTime_Check(PyObject* op)

_

PyDateTime_CheckExact
int PyDateTime_CheckExact(PyObject* op)

_

PyDateTime_DATE_GET_FOLD
int PyDateTime_DATE_GET_FOLD(PyObject* o)

_

PyDateTime_DATE_GET_HOUR
int PyDateTime_DATE_GET_HOUR(PyObject* o)

Applies for date and datetime instances.

PyDateTime_DATE_GET_MICROSECOND
int PyDateTime_DATE_GET_MICROSECOND(PyObject* o)

Applies for date and datetime instances.

PyDateTime_DATE_GET_MINUTE
int PyDateTime_DATE_GET_MINUTE(PyObject* o)

Applies for date and datetime instances.

PyDateTime_DATE_GET_SECOND
int PyDateTime_DATE_GET_SECOND(PyObject* o)

Applies for date and datetime instances.

PyDateTime_FromDateAndTime
PyObject* PyDateTime_FromDateAndTime(int year, int month, int day, int hour, int min, int sec, int usec)

_

PyDateTime_FromDateAndTimeAndFold
PyObject* PyDateTime_FromDateAndTimeAndFold(int year, int month, int day, int hour, int min, int sec, int usec, int fold)

_

PyDateTime_FromTimestamp
PyObject* PyDateTime_FromTimestamp(PyObject* args)

_

PyDateTime_GET_DAY
int PyDateTime_GET_DAY(PyObject* o)

Applies for date and datetime instances.

PyDateTime_GET_MONTH
int PyDateTime_GET_MONTH(PyObject* o)

Applies for date and datetime instances.

PyDateTime_GET_YEAR
int PyDateTime_GET_YEAR(PyObject* o)

Applies for date and datetime instances.

PyDateTime_TIME_GET_FOLD
int PyDateTime_TIME_GET_FOLD(PyObject* o)

_

PyDateTime_TIME_GET_HOUR
int PyDateTime_TIME_GET_HOUR(PyObject* o)

Applies for time instances.

PyDateTime_TIME_GET_MICROSECOND
int PyDateTime_TIME_GET_MICROSECOND(PyObject* o)

Applies for time instances.

PyDateTime_TIME_GET_MINUTE
int PyDateTime_TIME_GET_MINUTE(PyObject* o)

Applies for time instances.

PyDateTime_TIME_GET_SECOND
int PyDateTime_TIME_GET_SECOND(PyObject* o)

Applies for time instances.

PyDate_Check
int PyDate_Check(PyObject* op)

_

PyDate_CheckExact
int PyDate_CheckExact(PyObject* op)

_

PyDate_FromDate
PyObject* PyDate_FromDate(int year, int month, int day)

_

PyDate_FromTimestamp
PyObject* PyDate_FromTimestamp(PyObject* args)

_

PyDelta_Check
int PyDelta_Check(PyObject* op)

_

PyDelta_CheckExact
int PyDelta_CheckExact(PyObject* op)

_

PyDelta_FromDSU
PyObject* PyDelta_FromDSU(int days, int seconds, int useconds)

_

PyTZInfo_Check
int PyTZInfo_Check(PyObject* op)

_

PyTZInfo_CheckExact
int PyTZInfo_CheckExact(PyObject* op)

_

PyTime_Check
int PyTime_Check(PyObject* op)

_

PyTime_CheckExact
int PyTime_CheckExact(PyObject* op)

_

PyTime_FromTime
PyObject* PyTime_FromTime(int hour, int minute, int second, int usecond)

_

PyTime_FromTimeAndFold
PyObject* PyTime_FromTimeAndFold(int hour, int minute, int second, int usecond, int fold)

_

Manifest constants

_PyDateTime_DATETIME_DATASIZE
enum _PyDateTime_DATETIME_DATASIZE;

of bytes for year, month, day, hour, minute, second, and usecond.

_PyDateTime_DATE_DATASIZE
enum _PyDateTime_DATE_DATASIZE;

of bytes for year, month, and day.

_PyDateTime_TIME_DATASIZE
enum _PyDateTime_TIME_DATASIZE;

of bytes for hour, minute, second, and usecond.

Static variables

PyDateTimeAPI
PyDateTime_CAPI* PyDateTimeAPI;

_

Structs

PyDateTime_CAPI
struct PyDateTime_CAPI

Structure for C API.

PyDateTime_Date
struct PyDateTime_Date

All datetime objects are of PyDateTime_DateTimeType, but that can be allocated in two ways too, just like for time objects above. In addition, the plain date type is a base class for datetime, so it must also have a hastzinfo member (although it's unused there).

PyDateTime_DateTime
struct PyDateTime_DateTime

_

PyDateTime_Delta
struct PyDateTime_Delta

subclass of PyObject.

PyDateTime_TZInfo
struct PyDateTime_TZInfo

a pure abstract base clase

PyDateTime_Time
struct PyDateTime_Time

_

_PyDateTime_BaseDateTime
struct _PyDateTime_BaseDateTime

_

_PyDateTime_BaseTZInfo
struct _PyDateTime_BaseTZInfo

No _PyDateTime_BaseTZInfo is allocated; it's just to have something convenient to cast to, when getting at the hastzinfo member of objects starting with _PyTZINFO_HEAD.

_PyDateTime_BaseTime
struct _PyDateTime_BaseTime

_

Templates

_PyDateTime_DATETIMEHEAD
template _PyDateTime_DATETIMEHEAD()

_

_PyDateTime_TIMEHEAD
template _PyDateTime_TIMEHEAD()

All time objects are of PyDateTime_TimeType, but that can be allocated in two ways, with or without a tzinfo member. Without is the same as tzinfo == None, but consumes less memory. _PyDateTime_BaseTime is an internal struct used to allocate the right amount of space for the "without" case.

_PyTZINFO_HEAD
template _PyTZINFO_HEAD()

The datetime and time types have hashcodes, and an optional tzinfo member, present if and only if hastzinfo is true.

Meta