formatDateMonthAndDate static method

String formatDateMonthAndDate(
  1. DateTime date
)

Formats a DateTime into 'MMM d' format and converts to uppercase.

Example: formatDateMonthAndDate(DateTime(2023, 11, 29)) returns 'NOV 29'.

Implementation

static String formatDateMonthAndDate(DateTime date) {
  return DateFormat('MMM d').format(date).toUpperCase();
}