toDateTime method

DateTime toDateTime({
  1. String format = 'EEE, dd MMM',
})

Parse a formatted string to DateTime Requires the same format used when formatting

Implementation

DateTime toDateTime({String format = 'EEE, dd MMM'}) {
  return DateFormat(format).parse(this);
}