DateRange
public struct DateRange : Hashable
Represents the date range when the tariff element is valid. This is typically used to indicate seasonal tariffs or to announce an update to the tariff in advance. It may also be used to indicate spot prices, together with time period. Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
First date when the element is valid. If absent the element becomes valid as soon as other conditions allow.
Declaration
Swift
public var from: Date? -
First date when the element is no longer valid, exclusive and later than
DateRange.from. If absent the element is valid until some other element takes over.Declaration
Swift
public var to: Date? -
Creates a new instance.
Declaration
Swift
public init(from: Date? = nil, to: Date? = nil)