date
DDataParser.date() validates immutable TheDate values. It natively accepts TheDate, SerializedTheDate, and JavaScript Date. In coercive mode (coerce: true), it also accepts safe timestamps and parsable date strings.
Interactive example
Parameters
errorMessage: custom message if the input cannot be converted toTheDate.checkers:checkerRefineto express your rules (ranges, intervals, etc.).coerce:trueto also acceptnumber(safe timestamp) andstring(parsable date) and convert toTheDate. Defaults tofalse.
Return value
A DataParserDate with the usual API (parse, asyncParse, exec, asyncExec, addChecker, clone). parse returns DEither.success<TheDate> or DEither.error<DataParserError> containing the issues.
