hours property

List<HourPeriod> hours

Returns the list of hours in this day.

Implementation

List<HourPeriod> get hours {
  const generator = HourGenerator();
  final hours = <HourPeriod>[];
  var last = generator.of(start);
  while (last.start.isBefore(end)) {
    hours.add(last);
    last = generator.after(last);
  }
  return hours;
}