getNiceDate static method

String getNiceDate(
  1. String date,
  2. DateFormat format, {
  3. String? localeCode,
})

Implementation

static String getNiceDate(String date, DateFormat format, {String? localeCode}) {
  try {
    return '${DateFormat('dd MMMM yyyy, HH:mm', localeCode ?? 'ca_ES').format(format.parseUTC(date).toLocal())}h';
  } catch (e) {
    return '';
  }
}