Back to index

python3.2  3.2.2
Classes | Defines | Variables
datetime.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PyDateTime_Delta
struct  PyDateTime_TZInfo
struct  _PyDateTime_BaseTZInfo
struct  _PyDateTime_BaseTime
struct  PyDateTime_Time
struct  PyDateTime_Date
struct  _PyDateTime_BaseDateTime
struct  PyDateTime_DateTime
struct  PyDateTime_CAPI

Defines

#define _PyDateTime_DATE_DATASIZE   4
#define _PyDateTime_TIME_DATASIZE   6
#define _PyDateTime_DATETIME_DATASIZE   10
#define _PyTZINFO_HEAD
#define _PyDateTime_TIMEHEAD
#define _PyDateTime_DATETIMEHEAD
#define PyDateTime_GET_YEAR(o)
#define PyDateTime_GET_MONTH(o)   (((PyDateTime_Date*)o)->data[2])
#define PyDateTime_GET_DAY(o)   (((PyDateTime_Date*)o)->data[3])
#define PyDateTime_DATE_GET_HOUR(o)   (((PyDateTime_DateTime*)o)->data[4])
#define PyDateTime_DATE_GET_MINUTE(o)   (((PyDateTime_DateTime*)o)->data[5])
#define PyDateTime_DATE_GET_SECOND(o)   (((PyDateTime_DateTime*)o)->data[6])
#define PyDateTime_DATE_GET_MICROSECOND(o)
#define PyDateTime_TIME_GET_HOUR(o)   (((PyDateTime_Time*)o)->data[0])
#define PyDateTime_TIME_GET_MINUTE(o)   (((PyDateTime_Time*)o)->data[1])
#define PyDateTime_TIME_GET_SECOND(o)   (((PyDateTime_Time*)o)->data[2])
#define PyDateTime_TIME_GET_MICROSECOND(o)
#define PyDateTime_CAPSULE_NAME   "datetime.datetime_CAPI"
#define PyDateTime_IMPORT   PyDateTimeAPI = (PyDateTime_CAPI *)PyCapsule_Import(PyDateTime_CAPSULE_NAME, 0)
#define PyDate_Check(op)   PyObject_TypeCheck(op, PyDateTimeAPI->DateType)
#define PyDate_CheckExact(op)   (Py_TYPE(op) == PyDateTimeAPI->DateType)
#define PyDateTime_Check(op)   PyObject_TypeCheck(op, PyDateTimeAPI->DateTimeType)
#define PyDateTime_CheckExact(op)   (Py_TYPE(op) == PyDateTimeAPI->DateTimeType)
#define PyTime_Check(op)   PyObject_TypeCheck(op, PyDateTimeAPI->TimeType)
#define PyTime_CheckExact(op)   (Py_TYPE(op) == PyDateTimeAPI->TimeType)
#define PyDelta_Check(op)   PyObject_TypeCheck(op, PyDateTimeAPI->DeltaType)
#define PyDelta_CheckExact(op)   (Py_TYPE(op) == PyDateTimeAPI->DeltaType)
#define PyTZInfo_Check(op)   PyObject_TypeCheck(op, PyDateTimeAPI->TZInfoType)
#define PyTZInfo_CheckExact(op)   (Py_TYPE(op) == PyDateTimeAPI->TZInfoType)
#define PyDate_FromDate(year, month, day)   PyDateTimeAPI->Date_FromDate(year, month, day, PyDateTimeAPI->DateType)
#define PyDateTime_FromDateAndTime(year, month, day, hour, min, sec, usec)
#define PyTime_FromTime(hour, minute, second, usecond)
#define PyDelta_FromDSU(days, seconds, useconds)
#define PyDateTime_FromTimestamp(args)
#define PyDate_FromTimestamp(args)

Variables

static PyDateTime_CAPIPyDateTimeAPI = NULL

Class Documentation

struct PyDateTime_Delta

Definition at line 34 of file datetime.h.

Class Members
int days
PyObject_HEAD Py_hash_t hashcode
int microseconds
int seconds
struct PyDateTime_TZInfo

Definition at line 43 of file datetime.h.

struct _PyDateTime_BaseTZInfo

Definition at line 61 of file datetime.h.

struct _PyDateTime_BaseTime

Definition at line 76 of file datetime.h.

struct PyDateTime_Time

Definition at line 81 of file datetime.h.

Collaboration diagram for PyDateTime_Time:
Class Members
_PyDateTime_TIMEHEAD PyObject * tzinfo
struct PyDateTime_Date

Definition at line 93 of file datetime.h.

Class Members
_PyTZINFO_HEAD unsigned char data
struct _PyDateTime_BaseDateTime

Definition at line 103 of file datetime.h.

struct PyDateTime_DateTime

Definition at line 108 of file datetime.h.

Collaboration diagram for PyDateTime_DateTime:
Class Members
_PyDateTime_DATETIMEHEAD PyObject * tzinfo

Define Documentation

#define _PyDateTime_DATE_DATASIZE   4

Definition at line 25 of file datetime.h.

Definition at line 31 of file datetime.h.

Value:
_PyTZINFO_HEAD                      \
    unsigned char data[_PyDateTime_DATETIME_DATASIZE];

Definition at line 99 of file datetime.h.

#define _PyDateTime_TIME_DATASIZE   6

Definition at line 28 of file datetime.h.

Value:
_PyTZINFO_HEAD              \
    unsigned char data[_PyDateTime_TIME_DATASIZE];

Definition at line 72 of file datetime.h.

#define _PyTZINFO_HEAD
Value:
PyObject_HEAD               \
    Py_hash_t hashcode;         \
    char hastzinfo;             /* boolean flag */

Definition at line 52 of file datetime.h.

#define PyDate_Check (   op)    PyObject_TypeCheck(op, PyDateTimeAPI->DateType)

Definition at line 191 of file datetime.h.

#define PyDate_CheckExact (   op)    (Py_TYPE(op) == PyDateTimeAPI->DateType)

Definition at line 192 of file datetime.h.

#define PyDate_FromDate (   year,
  month,
  day 
)    PyDateTimeAPI->Date_FromDate(year, month, day, PyDateTimeAPI->DateType)

Definition at line 207 of file datetime.h.

#define PyDate_FromTimestamp (   args)
Value:

Definition at line 227 of file datetime.h.

#define PyDateTime_CAPSULE_NAME   "datetime.datetime_CAPI"

Definition at line 161 of file datetime.h.

#define PyDateTime_Check (   op)    PyObject_TypeCheck(op, PyDateTimeAPI->DateTimeType)

Definition at line 194 of file datetime.h.

#define PyDateTime_CheckExact (   op)    (Py_TYPE(op) == PyDateTimeAPI->DateTimeType)

Definition at line 195 of file datetime.h.

#define PyDateTime_DATE_GET_HOUR (   o)    (((PyDateTime_DateTime*)o)->data[4])

Definition at line 121 of file datetime.h.

Value:
((((PyDateTime_DateTime*)o)->data[7] << 16) |       \
     (((PyDateTime_DateTime*)o)->data[8] << 8)  |       \
      ((PyDateTime_DateTime*)o)->data[9])

Definition at line 124 of file datetime.h.

#define PyDateTime_DATE_GET_MINUTE (   o)    (((PyDateTime_DateTime*)o)->data[5])

Definition at line 122 of file datetime.h.

#define PyDateTime_DATE_GET_SECOND (   o)    (((PyDateTime_DateTime*)o)->data[6])

Definition at line 123 of file datetime.h.

#define PyDateTime_FromDateAndTime (   year,
  month,
  day,
  hour,
  min,
  sec,
  usec 
)
Value:

Definition at line 210 of file datetime.h.

#define PyDateTime_GET_DAY (   o)    (((PyDateTime_Date*)o)->data[3])

Definition at line 119 of file datetime.h.

#define PyDateTime_GET_MONTH (   o)    (((PyDateTime_Date*)o)->data[2])

Definition at line 118 of file datetime.h.

#define PyDateTime_GET_YEAR (   o)
Value:
((((PyDateTime_Date*)o)->data[0] << 8) | \
                     ((PyDateTime_Date*)o)->data[1])

Definition at line 116 of file datetime.h.

Definition at line 187 of file datetime.h.

#define PyDateTime_TIME_GET_HOUR (   o)    (((PyDateTime_Time*)o)->data[0])

Definition at line 130 of file datetime.h.

Value:
((((PyDateTime_Time*)o)->data[3] << 16) |           \
     (((PyDateTime_Time*)o)->data[4] << 8)  |           \
      ((PyDateTime_Time*)o)->data[5])

Definition at line 133 of file datetime.h.

#define PyDateTime_TIME_GET_MINUTE (   o)    (((PyDateTime_Time*)o)->data[1])

Definition at line 131 of file datetime.h.

#define PyDateTime_TIME_GET_SECOND (   o)    (((PyDateTime_Time*)o)->data[2])

Definition at line 132 of file datetime.h.

#define PyDelta_Check (   op)    PyObject_TypeCheck(op, PyDateTimeAPI->DeltaType)

Definition at line 200 of file datetime.h.

#define PyDelta_CheckExact (   op)    (Py_TYPE(op) == PyDateTimeAPI->DeltaType)

Definition at line 201 of file datetime.h.

#define PyDelta_FromDSU (   days,
  seconds,
  useconds 
)
Value:
PyDateTimeAPI->Delta_FromDelta(days, seconds, useconds, 1, \
        PyDateTimeAPI->DeltaType)

Definition at line 218 of file datetime.h.

#define PyTime_Check (   op)    PyObject_TypeCheck(op, PyDateTimeAPI->TimeType)

Definition at line 197 of file datetime.h.

#define PyTime_CheckExact (   op)    (Py_TYPE(op) == PyDateTimeAPI->TimeType)

Definition at line 198 of file datetime.h.

#define PyTime_FromTime (   hour,
  minute,
  second,
  usecond 
)
Value:
PyDateTimeAPI->Time_FromTime(hour, minute, second, usecond, \
        Py_None, PyDateTimeAPI->TimeType)

Definition at line 214 of file datetime.h.

#define PyTZInfo_Check (   op)    PyObject_TypeCheck(op, PyDateTimeAPI->TZInfoType)

Definition at line 203 of file datetime.h.

#define PyTZInfo_CheckExact (   op)    (Py_TYPE(op) == PyDateTimeAPI->TZInfoType)

Definition at line 204 of file datetime.h.


Variable Documentation

Definition at line 185 of file datetime.h.