TemporalDate class

Represents a valid extended ISO-8601 Date string, with an optional timezone offset. YYYY-MM-DD±hh:mm:ss (ISO_OFFSET_DATE) or YYYY-MM-DD (ISO_LOCAL_DATE) https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html#appsync-defined-scalars

Implemented types
Annotations
  • @immutable

Constructors

TemporalDate(DateTime dateTime)
Constructs a new TemporalDate from a Dart DateTime The time fields (hour, minute, second, etc) are ignored
factory
TemporalDate.fromString(String iso8601String)
Constructs a new TemporalDate from a ISO8601 string adhering to the format: YYYY-MM-DD YYYY-MM-DDZ without Z: +hh:mm +hh:mm:ss
factory
TemporalDate.withOffset(DateTime dateTime, Duration offset)
Constructs a new TemporalDate from a Dart DateTime and Duration The time fields (hour, minute, second, etc) are ignored
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(TemporalDate other) int
Compares this object to another object.
override
format() String
Return ISO8601 String of format YYYY-MM-DD+hh:mm:ss
getDateTime() DateTime
Return DateTime
getOffset() Duration?
Return offset
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

now() TemporalDate
Constructs a new TemporalDate at the current date.