tryParse static method
Constructs a new EtDatetime instance based on formattedString
.
Works like parse except that this function returns null
where parse would throw a FormatException.
Implementation
static EtDatetime? tryParse(String formattedString) {
try {
return parse(formattedString);
} on FormatException {
return null;
}
}