DateOnly Class

  • DateOnly
  • class Esri::ArcGISRuntime::DateOnly

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

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

    Public Functions

    virtual ~DateOnly() override
    quint8 day() const
    quint8 month() const
    QString toString() const
    int year() const
    (since Esri::ArcGISRuntime 200.7) bool operator!=(Esri::ArcGISRuntime::DateOnly *other) const
    (since Esri::ArcGISRuntime 200.7) bool operator==(Esri::ArcGISRuntime::DateOnly *other) const

    Static Public Members

    Esri::ArcGISRuntime::DateOnly *create(const QString &dateString, QObject *parent = nullptr)
    Esri::ArcGISRuntime::DateOnly *create(int year, quint8 month, quint8 day, QObject *parent = nullptr)

    Detailed Description

    Member Function Documentation

    [override virtual noexcept] DateOnly::~DateOnly()

    Destructor.

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

    Creates a new date-only object with the given date string.

    • dateString - The ISO 8601 date string.
    • parent - The optional parent QObject.

    The provided date string must conform to the ISO 8601 date and time format.

    [static] Esri::ArcGISRuntime::DateOnly *DateOnly::create(int year, quint8 month, quint8 day, QObject *parent = nullptr)

    Creates a new date-only object from the provided year, month, and day.

    • year - The year.
    • month - The month.
    • day - The day.
    • parent - The optional parent QObject.

    Year must be at least 1 AD, month must be a value between 1-12 (inclusive), day must be a value between 1-31 (inclusive).

    quint8 DateOnly::day() const

    Returns the day component of the date represented by this instance.

    quint8 DateOnly::month() const

    Returns the month component of the date represented by this instance.

    QString DateOnly::toString() const

    Returns a string representing the date in ISO 8601 format, YYYY-MM-DD.

    int DateOnly::year() const

    Returns the year component of the date represented by this instance.

    [since Esri::ArcGISRuntime 200.7] bool DateOnly::operator!=(Esri::ArcGISRuntime::DateOnly *other) const

    Tests and returns true if two date-only objects are not equal.

    • other - The other date-only object.

    This function was introduced in Esri::ArcGISRuntime 200.7.

    [since Esri::ArcGISRuntime 200.7] bool DateOnly::operator==(Esri::ArcGISRuntime::DateOnly *other) const

    Tests and returns true if two date-only objects are equal.

    • other - The other date-only object.

    This function was introduced in Esri::ArcGISRuntime 200.7.

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