datetime

Methods

Method Reference: datetime.quarter

datetime: Q = quarter (T)

Quarter component of a datetime array.

Q = quarter (T) returns the quarter number for each element of the input datetime array T. The output Q is a double array containing integer values in the range [1, 4] and it has the same size as T. Not-A-Time (NaT) values in T are returned as NaN in the output array.

Source Code: datetime