TimeOnly Class

  • TimeOnly
  • class Esri::ArcGISRuntime::TimeOnly

    An object that represents a time without the date component. More...

    Header: #include <TimeOnly.h>
    Since: Esri::ArcGISRuntime 200.4
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    virtual ~TimeOnly() override
    bool equals(Esri::ArcGISRuntime::TimeOnly *other) const
    quint8 hours() const
    quint8 minutes() const
    quint8 seconds() const
    QString toString() const

    Static Public Members

    Esri::ArcGISRuntime::TimeOnly *create(const QString &timeString, QObject *parent = nullptr)
    Esri::ArcGISRuntime::TimeOnly *create(quint8 hours, quint8 minutes, quint8 seconds, QObject *parent = nullptr)

    Detailed Description

    Member Function Documentation

    [override virtual] TimeOnly::~TimeOnly()

    Destructor.

    [static] Esri::ArcGISRuntime::TimeOnly *TimeOnly::create(const QString &timeString, QObject *parent = nullptr)

    Creates a new time-only object from the ISO 8601 time value, HH:MM:SS.

    • timeString - The time.
    • parent - The optional parent QObject.

    Milliseconds are not supported for TimeOnly objects.

    [static] Esri::ArcGISRuntime::TimeOnly *TimeOnly::create(quint8 hours, quint8 minutes, quint8 seconds, QObject *parent = nullptr)

    Creates a new time-only object from the provided hours, minutes, and seconds.

    • hours - The hours.
    • minutes - The minutes.
    • seconds - The seconds.
    • parent - The optional parent QObject.

    Hours must be between 0-23 (inclusive), while minutes and seconds must be between 0-59 (inclusive).

    bool TimeOnly::equals(Esri::ArcGISRuntime::TimeOnly *other) const

    Returns tests if two time-only objects are equal.

    • other - The other time-only object.

    quint8 TimeOnly::hours() const

    Returns the hours component of the time represented by this instance.

    quint8 TimeOnly::minutes() const

    Returns the minutes component of the time represented by this instance.

    quint8 TimeOnly::seconds() const

    Returns the seconds component of the time represented by this instance.

    QString TimeOnly::toString() const

    Returns a string representing the time in ISO 8601 format, HH:MM:SS.

    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