yearDateRange method

  1. @override
String yearDateRange(
  1. DateTime date1,
  2. DateTime date2
)
override

No description provided for @yearDateRange.

In en, this message translates to: '{date1} - {date2}'

Implementation

@override
String yearDateRange(DateTime date1, DateTime date2) {
  final intl.DateFormat date1DateFormat = intl.DateFormat.MMMMd(localeName);
  final String date1String = date1DateFormat.format(date1);
  final intl.DateFormat date2DateFormat = intl.DateFormat.yMMMMd(localeName);
  final String date2String = date2DateFormat.format(date2);

  return '$date1String - $date2String';
}