DateOnly class final

An object that represents a date without the time component.

Implemented types

Constructors

DateOnly.withString(String dateString)
Creates a new date-only object with the given date string.
factory
DateOnly.withYearMonthDay({required int year, required int month, required int day})
Creates a new date-only object from the provided year, month, and day.
factory

Properties

day int
Gets the day component of the date represented by this instance.
no setter
hashCode int
The hash code for this object.
no setteroverride
month int
Gets the month component of the date represented by this instance.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
year int
Gets the year component of the date represented by this instance.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representing the date in ISO 8601 format, YYYY-MM-DD.
override

Operators

operator ==(Object other) bool
The equality operator.
override