src/util/PeriodicTimeSequence.js
function (sequenceString) {
            if (!sequenceString) {
                throw new ArgumentError(
                    Logger.logMessage(Logger.LEVEL_SEVERE, "PeriodicTimeSequence", "constructor", "missingString"));
            }

            var intervalParts = sequenceString.split("/");
            if (intervalParts.length !== 3) {
                throw new ArgumentError(
                    Logger.logMessage(Logger.LEVEL_SEVERE, "PeriodicTimeSequence", "constructor",
                        "The interval string " + sequenceString + " does not contain 3 elements."));
            }

            /**
             * This sequence's sequence string, as specified to the constructor.
             * @type {String}
             * @readonly
             */
            this.sequenceString = sequenceString;

            /**
             * This sequence's start time.
             * @type {Date}
             * @readonly
             */
            this.startTime = new Date(intervalParts[0]);

            /**
             * This sequence's end time.
             * @type {Date}
             * @readonly
             */
            this.endTime = new Date(intervalParts[1]);

            // Intentionally not documented.
            this.intervalMilliseconds = this.endTime.getTime() - this.startTime.getTime();

            // Documented with property accessor below.
            this._currentTime = this.startTime;

            /**
             * Indicates whether this sequence is an infinite sequence -- the start and end dates are the same.
             * @type {Boolean}
             * @readonly
             */
            this.infiniteInterval = this.startTime.getTime() == this.endTime.getTime();

            // Intentionally not documented. The array of sequence increments:
            // year, month, week, day, hours, minutes, seconds
            this.period = PeriodicTimeSequence.parsePeriodString(intervalParts[2], false);
        }
function (sequenceString) {
            if (!sequenceString) {
                throw new ArgumentError(
                    Logger.logMessage(Logger.LEVEL_SEVERE, "PeriodicTimeSequence", "constructor", "missingString"));
            }

            var intervalParts = sequenceString.split("/");
            if (intervalParts.length !== 3) {
                throw new ArgumentError(
                    Logger.logMessage(Logger.LEVEL_SEVERE, "PeriodicTimeSequence", "constructor",
                        "The interval string " + sequenceString + " does not contain 3 elements."));
            }

            /**
             * This sequence's sequence string, as specified to the constructor.
             * @type {String}
             * @readonly
             */
            this.sequenceString = sequenceString;

            /**
             * This sequence's start time.
             * @type {Date}
             * @readonly
             */
            this.startTime = new Date(intervalParts[0]);

            /**
             * This sequence's end time.
             * @type {Date}
             * @readonly
             */
            this.endTime = new Date(intervalParts[1]);

            // Intentionally not documented.
            this.intervalMilliseconds = this.endTime.getTime() - this.startTime.getTime();

            // Documented with property accessor below.
            this._currentTime = this.startTime;

            /**
             * Indicates whether this sequence is an infinite sequence -- the start and end dates are the same.
             * @type {Boolean}
             * @readonly
             */
            this.infiniteInterval = this.startTime.getTime() == this.endTime.getTime();

            // Intentionally not documented. The array of sequence increments:
            // year, month, week, day, hours, minutes, seconds
            this.period = PeriodicTimeSequence.parsePeriodString(intervalParts[2], false);
        }
function ( sequenceString ) { if ( ! sequenceString ) { throw new ArgumentError ( Logger . logMessage ( Logger . LEVEL_SEVERE , "PeriodicTimeSequence" , "constructor" , "missingString" ) ) ; } var intervalParts = sequenceString . split ( "/" ) ; if ( intervalParts . length !== 3 ) { throw new ArgumentError ( Logger . logMessage ( Logger . LEVEL_SEVERE , "PeriodicTimeSequence" , "constructor" , "The interval string " + sequenceString + " does not contain 3 elements." ) ) ; } /**
             * This sequence's sequence string, as specified to the constructor.
             * @type {String}
             * @readonly
             */ this . sequenceString = sequenceString ; /**
             * This sequence's start time.
             * @type {Date}
             * @readonly
             */ this . startTime = new Date ( intervalParts [ 0 ] ) ; /**
             * This sequence's end time.
             * @type {Date}
             * @readonly
             */ this . endTime = new Date ( intervalParts [ 1 ] ) ; // Intentionally not documented. this . intervalMilliseconds = this . endTime . getTime ( ) - this . startTime . getTime ( ) ; // Documented with property accessor below. this . _currentTime = this . startTime ; /**
             * Indicates whether this sequence is an infinite sequence -- the start and end dates are the same.
             * @type {Boolean}
             * @readonly
             */ this . infiniteInterval = this . startTime . getTime ( ) == this . endTime . getTime ( ) ; // Intentionally not documented. The array of sequence increments: // year, month, week, day, hours, minutes, seconds this . period = PeriodicTimeSequence . parsePeriodString ( intervalParts [ 2 ] , false ) ; }
Constructs a time sequence from an ISO 8601 string.
@alias PeriodicTimeSequence
@constructor
@classdesc 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.
@param {String} sequenceString The string describing the time sequence.
@throws {ArgumentError} If the specified intervalString is null, undefined or not a valid time interval
string.
Constructs a time sequence from an ISO 8601 string .