TemporalDateTime class
Represents a valid extended ISO-8601 DateTime string. The time zone offset is compulsory. YYYY-MM-DDThh:mm:ss.sssZ (ISO_OFFSET_DATE_TIME) https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html#appsync-defined-scalars
- Implemented types
- Annotations
-
- @immutable
Constructors
- TemporalDateTime(DateTime dateTime)
-
Constructs a new TemporalDateTime from a Dart DateTime
factory
- TemporalDateTime.fromString(String iso8601String)
-
Constructs a new TemporalDate from a ISO8601 string adhering to the format:
NOTE: Z or an offset is required
YYYY-MM-DDThh:mmZ
YYYY-MM-DDThh:mm:ssZ
YYYY-MM-DDThh:mm:ss.sssZ
without Z:
+hh:mm
+hh:mm:ss
factory
- TemporalDateTime.withOffset(DateTime dateTime, Duration offset)
-
Constructs a new TemporalDateTime from a Dart DateTime and Duration
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(
TemporalDateTime other) → int -
Compares this object to another object.
override
-
format(
) → String - Return ISO8601 String of format YYYY-MM-DDThh:mm:ss.sss+hh:mm:ss
-
getDateTimeInUtc(
) → DateTime - Returns DateTime in UTC
-
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(
) → TemporalDateTime - Constructs a new TemporalDateTime at the current date