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
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