pandas.tseries.offsets.QuarterEnd.startingMonth#

QuarterEnd.startingMonth#

Return the month of the year that anchors the quarters.

For the *Begin offsets this is a month in which a quarter starts, so startingMonth=1 anchors on January 1, April 1, July 1 and October 1. For the *End offsets it is a month in which a quarter ends, so startingMonth=1 anchors on January 31, April 30, July 31 and October 31.

See also

QuarterOffset.rule_code

Return the rule code for the quarter offset.

HalfYearOffset.startingMonth

Similar property for half-year-based offsets.

Examples

A *Begin offset starts its quarters in startingMonth:

>>> pd.offsets.QuarterBegin(startingMonth=2).startingMonth
2
>>> pd.Timestamp("2022-01-15") + pd.offsets.QuarterBegin(startingMonth=2)
Timestamp('2022-02-01 00:00:00')

An *End offset ends its quarters in startingMonth:

>>> pd.offsets.QuarterEnd(startingMonth=2).startingMonth
2
>>> pd.Timestamp("2022-01-15") + pd.offsets.QuarterEnd(startingMonth=2)
Timestamp('2022-02-28 00:00:00')