TemporalTimestamp class

The Temporal.Timestamp scalar type represents the number of seconds that have elapsed since 1970-01-01T00:00Z. Timestamps are serialized and deserialized as numbers. Negative values are also accepted and these represent the number of seconds til 1970-01-01T00:00Z.

Implemented types
Annotations
  • @immutable

Constructors

TemporalTimestamp(DateTime date)
Constructs a new TemporalTimestamp from a Dart DateTime
factory
TemporalTimestamp.fromSeconds(int secondsSinceEpoch)
Constructs a new TemporalTimestamp from int seconds
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(TemporalTimestamp other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toSeconds() int
Gets the number of seconds that have elapsed since the UNIX epoch.
toString() String
A string representation of this object.
override

Operators

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

Static Methods

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