isDate function

bool isDate(
  1. String str
)

Checks if the string represents a valid date.

Uses Dart's built-in DateTime.tryParse to validate the string formatting.

Example:

isDate('2023-12-01'); // true
isDate('invalid date'); // false

Implementation

bool isDate(String str) => _isDate(str);