Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: TimeExtent

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

NameSummary
new esri.TimeExtent(startTime, endTime)Creates a new TimeExtent object with the specifed start and end time.

Properties

NameTypeSummary
endTimeDateThe end time for the specified time extent.
startTimeDateThe start time for the specified time extent.

Methods

NameReturn typeSummary
intersection(timeExtent)TimeExtentReturns a new time extent indicating the intersection between "this" and the argument time extent.
offset(offsetValue, offsetUnits)TimeExtentReturns a new time extent with the given offset from "this' time extent.
Constructor Details

new esri.TimeExtent(startTime, endTime)

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

<Date> endTime

The end time for the specified time extent.
Sample:
timeExtent.endTime = new Date("12/31/1992 UTC");

<Date> startTime

The start time for the specified time extent.
Sample:

 timeExtent.startTime = new Date("1/1/1989 UTC");

 
Method Details

intersection(timeExtent)

Returns a new time extent indicating the intersection between "this" and the argument time extent.
Return type: TimeExtent
Parameters:
<TimeExtent> timeExtent Required The input time extent.

offset(offsetValue, offsetUnits)

Returns a new time extent with the given offset from "this' time extent.
Return type: TimeExtent
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.
Show Modal