weeksInWeekYear method

int weeksInWeekYear([
  1. WeekYearConfig config = WeekYearConfig.iso
])

Returns the number of weeks in the week year.

Implementation

int weeksInWeekYear([WeekYearConfig config = WeekYearConfig.iso]) {
  final wy = weekYear(config);
  final lastDayOfYear = DateTime(wy, 12, 31);
  final horaLastDay = Hora.fromDateTime(lastDayOfYear, locale: locale);
  return horaLastDay.weekOfWeekYear(config);
}