datetime_nb module¶
Numba-compiled utilities for working with dates and time.
DTCS DTCST¶
Status returned by within_fixed_dtc_nb() and within_periodic_dtc_nb().
Attributes
SU- Start matched, rest unknown. Move down the stack.
EU- End matched, rest unknown. Move down the stack.
U- Unknown. Move down the stack.
O- Outside
I- Inside
d_ns int¶
Day (nanoseconds).
d_td timedelta64¶
Day (timedelta).
h_ns int¶
Hour (nanoseconds).
h_td timedelta64¶
Hour (timedelta).
m_ns int¶
Minute (nanoseconds).
m_td timedelta64¶
Minute (timedelta).
mo_ns int¶
Month (nanoseconds).
mo_td timedelta64¶
Month (timedelta).
ms_ns int¶
Millisecond (nanoseconds).
ms_td timedelta64¶
Millisecond (timedelta).
ns_td timedelta64¶
Nanosecond (timedelta).
q_ns int¶
Quarter (nanoseconds).
q_td timedelta64¶
Quarter (timedelta).
s_ns int¶
Second (nanoseconds).
s_td timedelta64¶
Second (timedelta).
semi_mo_ns int¶
Semi-month (nanoseconds).
semi_mo_td timedelta64¶
Semi-month (timedelta).
unix_epoch_dt datetime64¶
Unix epoch (datetime).
us_ns int¶
Microsecond (nanoseconds).
us_td timedelta64¶
Microsecond (timedelta).
w_ns int¶
Week (nanoseconds).
w_td timedelta64¶
Week (timedelta).
y_ns int¶
Year (nanoseconds).
y_td timedelta64¶
Year (timedelta).
day_changed_nb function¶
Whether the day changed.
day_nb function¶
Get the day of the month.
day_of_year_nb function¶
Get the day of the year.
days_nb function¶
Get the number of days.
from_civil_nb function¶
Convert a year, month, and day into the timestamp.
future_weekday_nb function¶
Get the timestamp of a weekday in the future.
hour_nb function¶
Get the hour.
hours_nb function¶
Get the number of hours.
index_matches_dtc_nb function¶
Run matches_dtc_nb() on each element in an index and return a mask.
index_within_dtc_range_nb function¶
Run within_dtc_range_nb() on each element in an index and return a mask.
is_leap_year_nb function¶
Get whether the year is a leap year.
last_day_of_month_nb function¶
Get the last day of the month.
matches_date_nb function¶
Check whether the timestamp match the date provided in the civil format.
matches_dtc_nb function¶
Return whether one or more datetime components match other components.
microsecond_nb function¶
Get the microsecond.
microseconds_nb function¶
Get the number of microseconds.
midnight_nb function¶
Get the midnight of this day.
millisecond_nb function¶
Get the millisecond.
milliseconds_nb function¶
Get the number of milliseconds.
minute_nb function¶
Get the minute.
minutes_nb function¶
Get the number of minutes.
month_nb function¶
Get the month of the year.
must_resolve_dtc_nb function¶
Return whether the component must be resolved.
nanosecond_nb function¶
Get the nanosecond.
past_weekday_nb function¶
Get the timestamp of a weekday in the past.
second_nb function¶
Get the seconds.
second_remainder_nb function¶
Get the nanosecond remainder after the second.
seconds_nb function¶
Get the number of seconds.
start_dtc_eq_nb function¶
Return whether the start component equals to the end component.
start_dtc_gt_nb function¶
Return whether the start component is greater than the end component.
start_dtc_lt_nb function¶
Return whether the start component is less than the end component.
to_civil_nb function¶
Convert a timestamp into a tuple of the year, month, and day.
week_nb function¶
Get the week of the year.
weekday_diff_nb function¶
Get the difference in days between two weekdays.
weekday_from_days_nb function¶
Get the weekday from the total number of days.
Weekdays are ranging from 0 (Monday) to 6 (Sunday).
weekday_nb function¶
Get the weekday.
Weekdays are ranging from 0 (Monday) to 6 (Sunday).
within_dtc_range_nb function¶
Return whether one or more datetime components are within a range.
within_fixed_dtc_nb function¶
within_fixed_dtc_nb(
c,
start_c=None,
end_c=None,
prev_status=-1,
closed_start=True,
closed_end=False,
is_last=False
)
Return whether a single datetime component is within a fixed range.
Returns a status of the type DTCS.
within_periodic_dtc_nb function¶
within_periodic_dtc_nb(
c,
start_c=None,
end_c=None,
prev_status=-1,
closed_start=True,
closed_end=False,
overflow_later=False,
is_last=False
)
Return whether a single datetime component is within a periodic range.
Returns a status of the type DTCS.
year_nb function¶
Get the year.
DTCST class¶
DTCST(SU, EU, U, O, I)
Superclasses
builtins.tuple
EU method-wrapper¶
Alias for field number 1
I method-wrapper¶
Alias for field number 4
O method-wrapper¶
Alias for field number 3
SU method-wrapper¶
Alias for field number 0
U method-wrapper¶
Alias for field number 2