isFirstQuarter static method

bool isFirstQuarter(
  1. DateTime date
)

Check if a date is in the first quarter of the year

Implementation

static bool isFirstQuarter(DateTime date) {
  return date.month >= 1 && date.month <= 3;
}