Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 2.61 KB

nifty-tou.yeartemporalrangestariff.md

File metadata and controls

38 lines (26 loc) · 2.61 KB

Home > nifty-tou > YearTemporalRangesTariff

YearTemporalRangesTariff class

An extension of TemporalRangesTariff with support for an additional year range constraint.

Signature:

export default class YearTemporalRangesTariff extends TemporalRangesTariff 

Extends: TemporalRangesTariff

Constructors

Constructor Modifiers Description
(constructor)(yearRange, monthRange, dayOfMonthRange, dayOfWeekRange, minuteOfDayRange, rates) Constructor.

Properties

Property Modifiers Type Description
yearRange readonly IntRange | undefined Get the month of year range.

Methods

Method Modifiers Description
appliesAt(date, utc)

Test if this tariff applies on a given date.

All range constraints are treated as inclusive bounds, except for the minuteOfDayRange that is treated as an inclusive minimum and exclusive maximum.

appliesAtYearExtended(date, utc)

Test if this tariff applies on a given date.

All range constraints are treated as inclusive bounds, except for the minuteOfDayRange that is treated as an inclusive minimum and exclusive maximum.

compareTo(o)

Compares this object with the specified object for order.

Unbounded (null) values are ordered before bounded (non-null) values.

componentsDescription() protected Get a string representation of the components of this description.
format(locale, field, options) Format a field range into a locale-specific string.
parseYears(locale, yearRange, monthRange, dayOfMonthRange, dayOfWeekRange, minuteOfDayRange, rates, options) static Parse time range criteria into a YearTemporalRangesTariff instance.