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