TimeExtent Class

  • TimeExtent
  • class Esri::ArcGISRuntime::TimeExtent

    Represents a span of time between a start time and end time. More...

    Header: #include <TimeExtent.h>
    Since: Esri::ArcGISRuntime 100.3

    Public Functions

    TimeExtent()
    TimeExtent(const QDateTime &timeInstant)
    TimeExtent(const QDateTime &startTime, const QDateTime &endTime)
    TimeExtent(const Esri::ArcGISRuntime::TimeExtent &other)
    TimeExtent(Esri::ArcGISRuntime::TimeExtent &&other)
    ~TimeExtent()
    QDateTime endTime() const
    bool isEmpty() const
    QDateTime startTime() const
    Esri::ArcGISRuntime::TimeExtent &operator=(const Esri::ArcGISRuntime::TimeExtent &other)
    Esri::ArcGISRuntime::TimeExtent &operator=(Esri::ArcGISRuntime::TimeExtent &&other)

    Detailed Description

    To create a time extent which represents an instant in time set the start time and end time to the same time value. The TimeExtent is returned in the meta-data for time-aware services and layers. It is often used to create a time slider ranging from a start time to an end time.

    Dates and times must be passed in UTC.

    TimeExtent is immutable. Instead of changing the properties of an existing TimeExtent, create a new TimeExtent instance.

    Relevant samples:

    Member Function Documentation

    TimeExtent::TimeExtent()

    Default Constructor.

    [explicit] TimeExtent::TimeExtent(const QDateTime &timeInstant)

    Creates a time extent with a time instant.

    • timeInstant - The time instant is both the start and end time of the extent.

    This will construct a time extent that represents a single point in time. In other words, its start and end times are equal are timeInstant.

    TimeExtent::TimeExtent(const QDateTime &startTime, const QDateTime &endTime)

    Creates a time extent with the given start and end times.

    • startTime - The start time.
    • endTime - The end time.

    TimeExtent::TimeExtent(const Esri::ArcGISRuntime::TimeExtent &other)

    Copy constructor from other TimeExtent.

    TimeExtent::TimeExtent(Esri::ArcGISRuntime::TimeExtent &&other)

    Move constructor from other TimeExtent.

    TimeExtent::~TimeExtent()

    Destructor.

    QDateTime TimeExtent::endTime() const

    Returns the end time of this time extent.

    bool TimeExtent::isEmpty() const

    Returns whether the TimeExtent is empty.

    Returns true if empty.

    QDateTime TimeExtent::startTime() const

    Returns the start time of this time extent.

    Esri::ArcGISRuntime::TimeExtent &TimeExtent::operator=(const Esri::ArcGISRuntime::TimeExtent &other)

    Assignment operator from other TimeExtent.

    Esri::ArcGISRuntime::TimeExtent &TimeExtent::operator=(Esri::ArcGISRuntime::TimeExtent &&other)

    Move operator from other TimeExtent.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

    You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

    Your ArcGIS portal

    Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

    Your ArcGIS Location Platform dashboard

    Manage billing, monitor service usage, and access additional resources.

    Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

    Close