Home > nifty-tou > YearTemporalRangesTariffSchedule
A schedule, or collection, of YearTemporalRangesTariff rules that supports resolving rates for dates.
Signature:
export default class YearTemporalRangesTariffSchedule<T extends YearTemporalRangesTariff, O extends YearTemporalRangesTariffScheduleOptions> extends TemporalRangesTariffSchedule<T, O>
Extends: TemporalRangesTariffSchedule<T, O>
By default this schedule works similarly to the TemporalRangesTariffSchedule, except using YearTemporalRangesTariff instances that include a year criteria for matching dates. The yearExtend option changes the matching to treat the "most recent" year rules as having unbounded maximum values. The idea here is that the most recently defined rules remain applicable into future years, until another set of rules for some future year overrides them.
Property | Modifiers | Type | Description |
---|---|---|---|
yearExtend | readonly |
boolean | Get the year-extend mode. |
Method | Modifiers | Description |
---|---|---|
firstMatch(date, utc) | Find the first rule that applies on a given date. | |
matches(date, utc) | Find the rules that apply on a given date, repsecting the multipleMatch property. |