reformatDate method
Implementation
String reformatDate({
String from = 'yyyy-MM-ddTHH:mm:ssZ',
String to = 'dd MMM yyyy',
String locale = 'in',
int addHours = 0,
}) {
initializeDateFormatting(locale);
String output;
try {
output = toDateEx(format: from, locale: locale)
.add(addHours.hours)
.toStringEx(format: to, locale: locale);
} catch (e) {
logE(e.toString());
output = 'error';
}
return output;
}