quarter property

int get quarter

Quarter of the year, 1 to 4: months 1 to 3 are quarter 1.

Implementation

int get quarter => (month - 1) ~/ 3 + 1;