overrideFormatters method
FormatSetOptional
overrideFormatters(
)
override
Implementation
@override
FormatSetOptional overrideFormatters() {
return {
// From [EnglishLikeOrdinal] mixin
...formattersWithOrdinal,
// From [MonthNames] mixin
...formattersForMonthNames,
// Localization aware formats
FormatterToken.L: (dateTime) => reformat(dateTime, "MM/DD/YYYY"),
FormatterToken.l: (dateTime) => reformat(dateTime, "M/D/YYYY"),
FormatterToken.LL: (dateTime) => reformat(dateTime, "MMMM D YYYY"),
FormatterToken.ll: (dateTime) => reformat(dateTime, "MMM D YYYY"),
FormatterToken.LLL: (dateTime) =>
reformat(dateTime, "MMMM D YYYY hh:mm A"),
FormatterToken.lll: (dateTime) => reformat(dateTime, "MMM D YYYY h:mm A"),
FormatterToken.LLLL: (dateTime) =>
reformat(dateTime, "dddd, MMMM D YYYY hh:mm A"),
FormatterToken.llll: (dateTime) =>
reformat(dateTime, "ddd, MMM D YYYY h:mm A"),
FormatterToken.LT: (dateTime) => reformat(dateTime, "h:mm A"),
FormatterToken.LTS: (dateTime) => reformat(dateTime, "h:mm:ss A"),
};
}