getAsDateTime method

DateTime getAsDateTime(
  1. String key
)

Converts map element into a DateTime or returns the current date if conversion is not possible.

  • key a key of element to get. Returns DateTime value of the element or the current date if conversion is not supported.

See getAsDateTimeWithDefault

Implementation

DateTime getAsDateTime(String key) {
  return getAsDateTimeWithDefault(key, DateTime.now().toUtc());
}