Home > nifty-tou > TemporalRangesTariffSchedule
A schedule, or collection, of TemporalRangesTariff rules that supports resolving rates for dates.
Signature:
export default class TemporalRangesTariffSchedule<T extends TemporalRangesTariff, O extends TemporalRangesTariffScheduleOptions>
Constructor | Modifiers | Description |
---|---|---|
(constructor)(rules, options) | Constructor. |
Property | Modifiers | Type | Description |
---|---|---|---|
multipleMatch | readonly |
boolean | Get the multiple-match mode. |
options | readonly |
O | undefined | Get the options. |
rules | readonly |
readonly T[] | Get the rules. |
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. |
|
resolve(date, utc) | Resolve the tariff rates that apply on a given date, respecting the Duplicate rate |