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.