format method

  1. @override
String format(
  1. DateTime date
)
override

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) {
  return super
      .format(date)
      .runes
      .toList()
      .reversed
      .toList()
      .sublist(0, 2)
      .reversed
      .map((e) => String.fromCharCode(e))
      .join();
}