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
    bool equals(Esri::ArcGISRuntime::DateOnly *other) const
    quint8 month() const
    QString toString() const
    int year() const

    Static Public Members

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

    Detailed Description

    Member Function Documentation

    [override virtual] DateOnly::~DateOnly()

    Destructor.

    [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).

    [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.

    quint8 DateOnly::day() const

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

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

    Returns tests if two date-only objects are equal.

    • other - The other date-only object.

    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.

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