tryToDateFormatted method
Attempts to parse this string using format and locale, returning null on failure.
Implementation
DateTime? tryToDateFormatted(
String format,
String? locale, {
bool utc = false,
}) {
try {
return toDateFormatted(format, locale, utc: utc);
} catch (_) {
return null;
}
}