of method

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

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

Implementation

@override
HourPeriod of(DateTime date) {
  return HourPeriod(
    start: date.copyWith(
      minute: 0,
      second: 0,
      millisecond: 0,
      microsecond: 0,
    ),
    end: date.copyWith(
      minute: 59,
      second: 59,
      millisecond: 999,
      microsecond: 999,
    ),
  );
}