pandas.tseries.offsets.Easter.is_on_offset — pandas 3.0.0rc0+50.gf4cd63d03d documentation (original) (raw)
Easter.is_on_offset(dt)#
Return boolean whether a timestamp intersects with this frequency.
This method determines if a given timestamp aligns with the start of a custom business month, as defined by this offset. It accounts for custom rules, such as skipping weekends or other non-business days, and checks whether the provided datetime falls on a valid business day that marks the beginning of the custom business month.
Parameters:
dtdatetime.datetime
Timestamp to check intersections with frequency.
See also
tseries.offsets.CustomBusinessMonthBegin
Represents the start of a custom business month.
tseries.offsets.CustomBusinessMonthEnd
Represents the end of a custom business month.
Examples
ts = pd.Timestamp(2022, 1, 1) freq = pd.offsets.Day(1) freq.is_on_offset(ts) True
ts = pd.Timestamp(2022, 8, 6) ts.day_name() 'Saturday' freq = pd.offsets.BusinessDay(1) freq.is_on_offset(ts) False