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 in nanoseconds.
d_td timedelta64¶
Day as a timedelta.
h_ns int¶
Hour in nanoseconds.
h_td timedelta64¶
Hour as a timedelta.
m_ns int¶
Minute in nanoseconds.
m_td timedelta64¶
Minute as a timedelta.
mo_ns int¶
Month in nanoseconds.
mo_td timedelta64¶
Month as a timedelta.
ms_ns int¶
Millisecond in nanoseconds.
ms_td timedelta64¶
Millisecond as a timedelta.
ns_td timedelta64¶
Nanosecond as a timedelta.
q_ns int¶
Quarter in nanoseconds.
q_td timedelta64¶
Quarter as a timedelta.
s_ns int¶
Second in nanoseconds.
s_td timedelta64¶
Second as a timedelta.
semi_mo_ns int¶
Semi-month in nanoseconds.
semi_mo_td timedelta64¶
Semi-month as a timedelta.
unix_epoch_dt datetime64¶
Unix epoch (datetime).
us_ns int¶
Microsecond in nanoseconds.
us_td timedelta64¶
Microsecond as a timedelta.
w_ns int¶
Week in nanoseconds.
w_td timedelta64¶
Week as a timedelta.
y_ns int¶
Year in nanoseconds.
y_td timedelta64¶
Year as a 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