Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.98 KB

nifty-tou.yeartemporalrangestariffschedule.md

File metadata and controls

32 lines (20 loc) · 1.98 KB

Home > nifty-tou > YearTemporalRangesTariffSchedule

YearTemporalRangesTariffSchedule class

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>

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.

Properties

Property Modifiers Type Description
yearExtend readonly boolean Get the year-extend mode.

Methods

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.