Date class

Implemented types

Constructors

Date(int year, [int month = 1, int day = 1])
Date.fromDateTime(DateTime dt)
Date.now()
factory
Date.parse(String formattedString)
Constructs a new Date instance based on formattedString.
factory
Date.parseYMdString(String dateString, String locale)
factory
Date.parseYMMddString(String dateString, String locale)
factory
Date.parseYMMMMdString(String dateString, String locale)
factory

Properties

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

Methods

add(Duration duration) Date
compareTo(Date other) int
Compares this object to another object.
override
difference(Date other) Duration
duplicate() Date
isAfter(Date other) bool
isBefore(Date other) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subtract(Duration duration) Date
toDateTime() DateTime
toIso8601String() String
toJson([dynamic value]) → dynamic
toString() String
A string representation of this object.
override
toYMdString(String locale) String
toYMMddString(String locale) String
toYMMMMdString(String locale) String

Operators

operator <(Date other) bool
operator <=(Date other) bool
operator ==(Object other) bool
Returns true if other is a Date at the same day.
override
operator >(Date other) bool
operator >=(Date other) bool

Static Properties

YMdMap Map<String, DateFormat>
getter/setter pair
YMMMMdMap Map<String, DateFormat>
getter/setter pair

Static Methods

tryParse(String formattedString) Date?