This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/TimeExtent.html.
Packagecom.esri.ags
Classpublic class TimeExtent
InheritanceTimeExtent Inheritance flash.events.EventDispatcher

Since : ArcGIS API for Flex 2.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

com.esri.ags.layers.ArcGISDynamicMapServiceLayer
com.esri.ags.layers.FeatureLayer
com.esri.ags.layers.supportClasses.ImageParameters
com.esri.ags.layers.supportClasses.TimeInfo
com.esri.ags.tasks.supportClasses.Query
Live sample - Using TimeExtent for a query.


Public Properties
 PropertyDefined By
  endTime : Date
The end time for the time extent.
TimeExtent
  startTime : Date
The start time for the time extent.
TimeExtent
Public Methods
 MethodDefined By
  
TimeExtent(startTime:Date = null, endTime:Date = null)
Creates a new TimeExtent.
TimeExtent
  
Returns a new time extent of the overlapping times that are in both time extents.
TimeExtent
  
intersects(timeExtent:TimeExtent):Boolean
Checks if the times in the argument intersects "this" time extent.
TimeExtent
  
offset(timeOffset:Number, timeOffsetUnits:String):TimeExtent
Returns a new time extent with the given offset from "this" time extent.
TimeExtent
  
Returns a new time extent that covers both time extents.
TimeExtent
Property Detail
endTimeproperty
endTime:Date

The end time for the time extent.

The default value is null which represents Infinity.

This property can be used as the source for data binding.


Implementation
    public function get endTime():Date
    public function set endTime(value:Date):void
startTimeproperty 
startTime:Date

The start time for the time extent.

The default value is null which represents -Infinity.

This property can be used as the source for data binding.


Implementation
    public function get startTime():Date
    public function set startTime(value:Date):void
Constructor Detail
TimeExtent()Constructor
public function TimeExtent(startTime:Date = null, endTime:Date = null)

Creates a new TimeExtent.

Parameters
startTime:Date (default = null) — The start time of the time extent.
 
endTime:Date (default = null) — The end time of the time extent.
Method Detail
intersection()method
public function intersection(timeExtent:TimeExtent):TimeExtent

Returns a new time extent of the overlapping times that are in both time extents.

Parameters

timeExtent:TimeExtent — The input time extent.

Returns
TimeExtent — The intersecting time extent or null if the time extents do not intersect.
intersects()method 
public function intersects(timeExtent:TimeExtent):Boolean

Checks if the times in the argument intersects "this" time extent.

Parameters

timeExtent:TimeExtent — The input time extent.

Returns
Boolean — Return true if intersects, false otherwise.
offset()method 
public function offset(timeOffset:Number, timeOffsetUnits:String):TimeExtent

Returns a new time extent with the given offset from "this" time extent.

Parameters

timeOffset:Number — The amount of time offset.
 
timeOffsetUnits:String — The units of the timeOffset.

Returns
TimeExtent — A new offset TimeExtent

See also

union()method 
public function union(timeExtent:TimeExtent):TimeExtent

Returns a new time extent that covers both time extents.

Parameters

timeExtent:TimeExtent — The input time extent.

Returns
TimeExtent — A new union time extent.