formatDayDateMonthAndYear static method

String formatDayDateMonthAndYear(
  1. DateTime? date
)

Formats a nullable DateTime into 'EEE, MMM d, y' format and converts to uppercase. Returns an empty string if the date is null or on error.

Implementation

static String formatDayDateMonthAndYear(DateTime? date) {
  try {
    return DateFormat.yMMMEd().format(date!).toUpperCase();
  } catch (e) {
    return '';
  }
}