weekdaysInMonth method

List<Hora> weekdaysInMonth(
  1. int weekday
)

Gets all occurrences of a weekday in the current month.

Implementation

List<Hora> weekdaysInMonth(int weekday) {
  final result = <Hora>[];
  var current = firstWeekdayInMonth(weekday);

  while (current.month == month) {
    result.add(current);
    current = current.add(7, TemporalUnit.day);
  }

  return result;
}