dateFormat static method
Implementation
static String? dateFormat(dynamic tanggal,
{String format = 'dd MMMM yyyy',
String locale = 'id',
Duration? addDuration}) {
String? hasil;
DateTime? date = toDateTime(tanggal);
if (date != null) {
if (addDuration != null) {
date = date.add(addDuration);
}
hasil = DateFormat(format, locale).format(date).toString();
}
return hasil;
}