of method

  1. @override
YearPeriod of(
  1. DateTime date
)
override

Returns the period of the given date considering the generator type.

Implementation

@override
YearPeriod of(DateTime date) {
  return YearPeriod(
    start: date.firstDayOfYear.date,
    end: date.lastDayOfYear.endOfDay,
  );
}