picop.cydatetime#
datetime.h helpers (imports DateTime C-API on load).
- picop.cydatetime.dt_date_check(o)#
Return True if
ois adateor subtype (PyDate_Check). :type o:object:param o:- Return type:
- picop.cydatetime.dt_date_check_exact(o)#
Return True if
type(o) is date(PyDate_CheckExact). :type o:object:param o:- Return type:
- picop.cydatetime.dt_date_day(o)#
Return the day field of date
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_date_eq(a, b)#
Return True if
a == bfor dates (exact y/m/d; else richcompare). :type a:object:param a: :type b:object:param b:- Return type:
- picop.cydatetime.dt_date_month(o)#
Return the month field of date
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_date_new(year, month, day)#
Return a
datevia DateTime C-API.Notes
Ranges are unchecked — trusted-caller. See Safety.
- picop.cydatetime.dt_date_year(o)#
Return the year field of date
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_check(o)#
Return True if
ois adatetimeor subtype (PyDateTime_Check). :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_check_exact(o)#
Return True if
type(o) is datetime(PyDateTime_CheckExact). :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_day(o)#
Return the day field of datetime
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_eq(a, b)#
Return True if
a == bfor datetimes (exact naive fields; else richcompare). :type a:object:param a: :type b:object:param b:- Return type:
- picop.cydatetime.dt_datetime_hour(o)#
Return the hour field of datetime
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_microsecond(o)#
Return the microsecond field of datetime
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_minute(o)#
Return the minute field of datetime
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_month(o)#
Return the month field of datetime
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_new(year, month, day, hour, minute, second, microsecond, tz=None, fold=0)#
Return a
datetimevia DateTime C-API.Notes
Ranges are unchecked — trusted-caller. See Safety.
- picop.cydatetime.dt_datetime_second(o)#
Return the second field of datetime
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_datetime_year(o)#
Return the year field of datetime
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_time_check(o)#
Return True if
ois atimeor subtype (PyTime_Check). :type o:object:param o:- Return type:
- picop.cydatetime.dt_time_check_exact(o)#
Return True if
type(o) is time(PyTime_CheckExact). :type o:object:param o:- Return type:
- picop.cydatetime.dt_time_eq(a, b)#
Return True if
a == bfor times (exact naive h/m/s/us; else richcompare). :type a:object:param a: :type b:object:param b:- Return type:
- picop.cydatetime.dt_time_hour(o)#
Return the hour field of time
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_time_microsecond(o)#
Return the microsecond field of time
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_time_minute(o)#
Return the minute field of time
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_time_new(hour, minute, second, microsecond, tz=None, fold=0)#
Return a
timevia DateTime C-API.Notes
Ranges are unchecked — trusted-caller. See Safety.
- picop.cydatetime.dt_time_second(o)#
Return the second field of time
o. :type o:object:param o:- Return type:
- picop.cydatetime.dt_timedelta_check(o)#
Return True if
ois atimedeltaor subtype.Notes
Alias of
dt_delta_check(preferredtimedeltaspelling).
- picop.cydatetime.dt_timedelta_check_exact(o)#
Return True if
type(o) is timedelta.Notes
Alias of
dt_delta_check_exact(preferredtimedeltaspelling).
- picop.cydatetime.dt_timedelta_days(o)#
Return the days component of timedelta
o.Notes
Alias of
dt_delta_days(preferredtimedeltaspelling).
- picop.cydatetime.dt_timedelta_eq(a, b)#
Return True if
a == bfor timedeltas (exact days/s/us; else richcompare). :type a:object:param a: :type b:object:param b:- Return type:
- picop.cydatetime.dt_timedelta_microseconds(o)#
Return the microseconds component of timedelta
o.Notes
Alias of
dt_delta_microseconds(preferredtimedeltaspelling).