tryParseAnyDateTime function
Try parsing a date string into a DateTime object.
Implementation
DateTime? tryParseAnyDateTime(Object? timestamp, {Object? locale}) {
if (locale != null) {
final parser = AnyDate.fromLocale(locale);
return parser.tryParse(timestamp);
}
return _defaultParser.tryParse(timestamp);
}