Moment class

Constructors

Moment()
Default Moment constructor. Creates a new Moment instance based on current time in the local time zone.
Moment.fromDate(DateTime date)
Creates a new Moment with the specified date. [...]
Moment.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch, { bool isUtc: false })
Creates a new Moment based on miliseconds since the Epoch (January 1st 1970) [...]
Moment.now()
Creates a Moment based on current system time in the local time zone. [...]

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

date() → DateTime
Returns the inner DateTime.
from(Moment moment, [ bool withoutPrefixOrSuffix = false ]) → String
Returns a String with the different between this and moment. Takes an optional bool argument to decide whether to use an identifier. withoutPrefixOrSuffix defaults to false. [...]
fromNow([bool withoutPrefixOrSuffix = false ]) → String
Returns a String with the different between this and Moment.now(). Takes an optional bool argument to decide whether to use an identifier. withoutPrefixOrSuffix defaults to false. [...]
locale([ILocale locale = null ]) ILocale
Simultaneous getter and setter for this instance's locale. [...]
toString() → String
Retuns a human-readable String for this instance. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Methods

globalLocale([ILocale locale = null ]) ILocale
Simultaneous getter and setter for the global locale. [...]
parse(String date) Moment
Constructs a new Moment instance based on formattedString. [...]