isIso8601DateString top-level property

Matcher isIso8601DateString
final

Ensures that a string is an ISO-8601 date string.

Implementation

final Matcher isIso8601DateString = predicate(
  (x) {
    try {
      return x is String && DateTime.parse(x) != null;
    } catch (_) {
      return false;
    }
  },
  'a valid ISO-8601 date string.',
)