File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7171 --format=actions \
7272 -i ES01 ` # For now it is ok if docstrings are missing the extended summary` \
7373 -i " pandas.tseries.offsets.CustomBusinessHour PR02,SA01" \
74- -i " pandas.tseries.offsets.FY5253Quarter.is_on_offset GL08" \
7574 -i " pandas.tseries.offsets.LastWeekOfMonth.is_on_offset GL08" \
7675 -i " pandas.tseries.offsets.SemiMonthBegin.rule_code GL08" \
7776 -i " pandas.tseries.offsets.SemiMonthEnd.rule_code GL08" \
Original file line number Diff line number Diff line change @@ -6004,6 +6004,40 @@ cdef class FY5253Quarter(FY5253Mixin):
60046004 return weeks_in_year == 53
60056005
60066006 def is_on_offset(self , dt: datetime ) -> bool:
6007+ """
6008+ Return boolean whether a timestamp intersects with this frequency.
6009+
6010+ This method checks if a given datetime falls on a fiscal quarter end date
6011+ as defined by the 52-53 week fiscal year calendar.
6012+
6013+ Parameters
6014+ ----------
6015+ dt : datetime
6016+ Timestamp to check.
6017+
6018+ Returns
6019+ -------
6020+ bool
6021+ True if the timestamp is on a fiscal quarter end , False otherwise.
6022+
6023+ See Also
6024+ --------
6025+ FY5253.is_on_offset : Check if timestamp is on fiscal year end.
6026+ DateOffset.is_on_offset : Check if timestamp intersects with frequency.
6027+
6028+ Examples
6029+ --------
6030+ >>> offset = pd.offsets.FY5253Quarter(
6031+ ... weekday = 4 , startingMonth = 12 , variation = " last"
6032+ ... )
6033+ >>> ts = pd.Timestamp(2022 , 4 , 1 )
6034+ >>> offset.is_on_offset(ts )
6035+ True
6036+
6037+ >>> ts = pd.Timestamp(2022 , 4 , 3 )
6038+ >>> offset.is_on_offset(ts )
6039+ False
6040+ """
60076041 if self.normalize and not _is_normalized(dt ):
60086042 return False
60096043 if self ._offset.is_on_offset(dt):
You can’t perform that action at this time.
0 commit comments