dojo.require("esri.TimeExtent")
Description
(Added at v2.0)
The time extent is a span of time going from a start time to an end time. To represent an instant in time set the startTime and endTime to the same time value. The TimeExtent is returned in the metadata for time-aware services and layers. It is often used to create a
TimeSlider
ranging from a start time to an end time.
See also
Samples
Search for
samples that use this class.
Constructors
Properties
Methods
Constructor Details
Creates a new TimeExtent object with the specifed start and end time. If the startTime is null or undefined the start time is negative infinity. If the endTime is null or undefined the endTime is positive infinity. To represent an instant in time set the startTime and endTime to the same time value.
Parameters:
<Date > startTime |
Required |
The start time for the specified time extent. |
<Date > endTime |
Required |
The end time for the specified time extent. |
Sample:
var timeExtent = new esri.TimeExtent(new Date("10/16/2000"),new Date("10/18/2000"));
Property Details
The end time for the specified time extent.
Sample:
timeExtent.endTime = new Date("12/31/1992 UTC");
The start time for the specified time extent.
Sample:
timeExtent.startTime = new Date("1/1/1989 UTC");
Method Details
Returns a new time extent indicating the intersection between "this" and the argument time extent.
Parameters:
<TimeExtent > timeExtent |
Required |
The input time extent. |
Returns a new time extent with the given offset from "this' time extent.
Parameters:
<Number > offsetValue |
Required |
The length of time to offset from "this" time extent. |
<String > offsetUnits |
Required |
The offset units, see the TimeInfo constants for a list of valid values. |