Returns the period of the given date considering the generator type.
date
@override DayPeriod of(DateTime date) { final start = date.date; final end = date.endOfDay; return DayPeriod(start: start, end: end); }