require(["esri/TimeExtent"], function(TimeExtent) { /* code goes here */ });
Class: esri/TimeExtent
Inheritance: TimeExtent JSONSupport
Since: ArcGIS API for JavaScript 4.11

A period of time with definitive start and end dates. The time extent is used to display or query features that fall within the specified time period. To represent a single point in time set the start and end times to the same time value.

When creating a new JavaScript Date for start and end times of the time extent, always specify UTC for the time zone. If you do not do this, the time zone will default to the current local time, which can result in dates that are off by several hours.

Example:
// Represents the data for the month of Jan, 1970
const timeExtent = new TimeExtent({
  start: new Date("0/1/1970 6:30:00 UTC"),
  end: new Date("0/31/1970 6:30:00 UTC")
});

Constructors

new TimeExtent(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Example:
// Typical usage
// Represents the data for the month of Jan, 1970
const timeExtent = new TimeExtent({
  start: new Date("1/1/1970 6:30:00 UTC"),
  end: new Date("1/31/1970 6:30:00 UTC")
});

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
Date

The end time of the time extent.

more details
more detailsTimeExtent
Date

The start time of the time extent.

more details
more detailsTimeExtent

Property Details

end Date

The end time of the time extent.

Default Value:null
start Date

The start time of the time extent.

Default Value:null

Method Overview

NameReturn TypeSummaryClass
TimeExtent

Creates a deep clone of TimeExtent object.

more details
more detailsTimeExtent

Method Details

clone(){TimeExtent}

Creates a deep clone of TimeExtent object.

Returns:
TypeDescription
TimeExtentA new instance of a Query object equal to the object used to call .clone().

API Reference search results

NameTypeModule
Loading...