DateOnly class
Represents a single day.
- Implemented types
Constructors
- DateOnly(int year, int month, int day)
-
Constructs a DateOnly from
year
,month
, andday
. Throws ArgumentError if components do not represent a valid date. - DateOnly.fromDateTime(DateTime source)
- Constructs a DateOnly from DateTime.
- DateOnly.fromJson(String json)
-
Deserializes a string into DateOnly.
factory
Properties
Methods
-
compareTo(
DateOnly other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDateTimeLocal(
) → DateTime - Constructs a local DateTime representation of DateOnly.
-
toDateTimeUtc(
) → DateTime - Constructs a UTC DateTime representation of DateOnly.
-
toJson(
) → String - Serializes DateOnly into a string.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override