format method
Format the given date
and return the formatted string.
The format specifiers are case-sensitive.
The following table lists the available format specifiers:
Specifier | Meaning | Example |
---|---|---|
YYYY |
Year with 4 digits | 2019 |
YY |
Year with 2 digits | 19 |
MMMM |
Month name | January |
... | ... | ... |
Implementation
@override
String format(DateTime date) => ((date.month - 1) ~/ 3 + 1).toString();