formatShortDate method

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

Formats the date using a short-width format.

Includes the abbreviation of the month, the day and year.

Examples:

  • US English: Feb 21, 2019
  • Russian: 21 февр. 2019 г.

Implementation

@override
String formatShortDate(DateTime date) {
  Jalali jdate = Jalali.fromDateTime(date);
  final String month =
      _shortMonths[jdate.month - 1]; // Jalali months are 1-based
  return '${jdate.day} $month, ${jdate.year}';
}