isDate function

bool isDate(
  1. String str
)

check if the string is a date

Implementation

bool isDate(String str) {
  return DateTime.tryParse(str) != null;
}