endOfFiscalYearWithConfig method
Gets the end of the fiscal year using a configuration.
Implementation
Hora endOfFiscalYearWithConfig(FiscalYearConfig config) {
_validateFiscalYearConfig(config);
final fy = fiscalYearWithConfig(config);
final nextStartYear = (fy + 1) - config.yearOffset;
final nextStartDay = _effectiveFiscalStartDay(
year: nextStartYear,
month: config.startMonth,
startDay: config.startDay,
);
final nextStart = Hora.of(
year: nextStartYear,
month: config.startMonth,
day: nextStartDay,
utc: isUtc,
locale: locale,
);
return nextStart.subtract(1, TemporalUnit.day).endOf(TemporalUnit.day);
}