DateTimeFormatter class abstract
DateTime formatter.
Custom formatter can be created by extending this class. The format method must be implemented.
Example:
class CustomFormatter implements DateTimeFormatter {
const CustomFormatter();
@override
String format(DateTime date) {
// Format the date and return the formatted string.
}
@override
String get specifier => 'custom';
}
Constructors
Properties
Methods
-
format(
DateTime date) → String -
Format the given
date
and return the formatted string. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited