weeksInYear method

int weeksInYear({
  1. WeekConfig config = WeekConfig.iso,
})

The number of weeks in the specified year (52 or 53).

Implementation

int weeksInYear({WeekConfig config = WeekConfig.iso}) {
  _validateWeekConfig(config);
  // Dec 28 is always in the last week of its own year.
  final dec28 = Hora.of(
    year: year,
    month: 12,
    day: 28,
    utc: isUtc,
    locale: locale,
  );
  return dec28._weekOfYear(config);
}