parseAndFormat static method
String
parseAndFormat(
- String date, {
- dynamic formatFrom = 'yyyy-MM-dd HH:mm:ss',
- dynamic formatTo = 'yyyy-MM-dd HH:mm:ss',
- dynamic locale = 'id_ID',
Implementation
static String parseAndFormat(String date, {formatFrom = 'yyyy-MM-dd HH:mm:ss', formatTo = 'yyyy-MM-dd HH:mm:ss', locale = 'id_ID'}) {
DateTime dateTime = parse(date, format: formatFrom, locale: locale);
return format(dateTime, format: formatTo, locale: locale);
}