isDateTime static method

bool isDateTime(
  1. String s
)

Checks if string is DateTime (UTC or Iso8601).

Implementation

static bool isDateTime(String s) =>
    hasMatch(s, r'^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}.\d{3}Z?$');