Class: PeriodicTimeSequence

PeriodicTimeSequence(sequenceString)

Represents a time sequence described as an ISO 8601 time-format string as required by WMS. The string must be in the form start/end/period, where start and end are ISO 8601 time values and period is an ISO 8601 period specification. This class provides iteration over the sequence in steps specified by the period. If the start and end dates are different, iteration will start at the start date and end at the end date. If the start and end dates are the same, iteration will start at the specified date and will never end.

Constructor

new PeriodicTimeSequence(sequenceString)

Constructs a time sequence from an ISO 8601 string.
Parameters:
Name Type Description
sequenceString String The string describing the time sequence.
Source:
Throws:
If the specified intervalString is null, undefined or not a valid time interval string.
Type
ArgumentError

Members

currentTime :Date

This sequence's current time.
Type:
  • Date
Default Value:
  • This sequence's start time.
Source:

(readonly) endTime :Date

This sequence's end time.
Type:
  • Date
Source:

(readonly) infiniteInterval :Boolean

Indicates whether this sequence is an infinite sequence -- the start and end dates are the same.
Type:
  • Boolean
Source:

scaleForCurrentTime :Number

Indicates the position of this sequence's current time relative to the sequence's total interval, in the range [0, 1]. A value of 0 indicates this sequence's start time. A value of 1 indicates this sequence's end time. A value of 0.5 indicates a current time that's exactly mid-way between this sequence's start time and end time.
Type:
  • Number
Source:

(readonly) sequenceString :String

This sequence's sequence string, as specified to the constructor.
Type:
  • String
Source:

(readonly) startTime :Date

This sequence's start time.
Type:
  • Date
Source:

Methods

getTimeForScale(scale) → {Date}

Returns the time associated with a specified value in the range [0, 1]. A value of 0 returns this sequence's start time. A value of 1 returns this sequence's end time. A value of 0.5 returs a time mid-way between this sequence's start and end times.
Parameters:
Name Type Description
scale The scale value. This value is clamped to the range [0, 1] before the time is determined.
Source:
Returns:
Type
Date

next() → {Date|null}

Sets this sequence's current time to the next time in the sequence and returns that time.
Source:
Returns:
The next time of this sequence, or null if no more times are in the sequence. Use reset to re-start this sequence. Use previous to step backwards through this sequence.
Type
Date | null

previous() → {Date|null}

Sets this sequence's current time to the previous time in the sequence and returns that time.
Source:
Returns:
The previous time of this sequence, or null if the sequence is currently at its start time. Use next to step forwards through this sequence.
Type
Date | null

reset()

Resets this sequence's current time to its start time. Use next to step forwards through this sequence. Use previous to step backwards through this sequence.
Source: