formatCompactDate method
Formats the date in a compact format.
Usually just the numeric values for the for day, month and year are used.
Examples:
- US English: 02/21/2019
- Russian: 21.02.2019
See also:
- parseCompactDate, which will convert a compact date string to a DateTime.
Implementation
@override
String formatCompactDate(DateTime date) {
final value = _require(date);
return '${value.day.toString().padLeft(2, '0')}/'
'${value.month.toString().padLeft(2, '0')}/'
'${value.year.toString().padLeft(4, '0')}';
}