the tariff type
the options type
Constructor.
the list of rules to include in the schedule
Optional options: boolean | Othe options, or a boolean shortcut to set the multipleMatch option
Private #optionsPrivate #rulesGet the multiple-match mode.
Get the options.
Get the rules.
Get the year-extend mode.
Private #matchesFind the rules that apply on a given date.
the date to find the matching rules at
true to return the first match, false to return all matches
true to extend the most recent available year
Optional utc: booleanif true then use UTC date components, otherwise assume the local time zone
the list of matching rules
Private #matchesFind the rules that apply on a given date.
the date to find the matching rules at
true to return the first match, false to return all matches
Optional utc: booleanif true then use UTC date components, otherwise assume the local time zone
the list of matching rules
Find the first rule that applies on a given date.
the date to find the first matching rule at
Optional utc: booleanif true then use UTC date components, otherwise assume the local time zone
the first available matching rule, or undefined if no rules match
Find the rules that apply on a given date, repsecting the multipleMatch property.
the date to find the matching rules at
Optional utc: booleanif true then use UTC date components, otherwise assume the local time zone
the list of matching rules; at most one if multipleMatch is false
Resolve the tariff rates that apply on a given date, respecting the multipleMatch property.
Duplicate rate id values will override existing rates, so that the last-seen rate for
a given id is the one returned.
the date to resolve
Optional utc: booleanif true then use UTC date components, otherwise assume the local time zone
all tariff rates tha apply on the given date, as a Record of rate id values
to associated rate instances
Generated using TypeDoc
A schedule, or collection, of YearTemporalRangesTariff rules that supports resolving rates for dates.
Remarks
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.