asDateTimeOr method

DateTime asDateTimeOr(
  1. DateTime defaultValue
)

Asserts that value exists, is a string, and can be parsed as a DateTime and returns it.

If value doesn't exist, this returns defaultValue.

Implementation

DateTime asDateTimeOr(DateTime defaultValue) => asDateTime;