getFormattedDate static method
Format a DateTime as a string with the specified format
(default is 'dd MMM yyyy').
Implementation
static String getFormattedDate(DateTime date,
{String format = 'dd MMM yyyy'}) {
return DateFormat(format).format(date);
}