DateTimeSyntax
rascal-0.40.17
Synopsis
A datetime value is syntactically incorrect.
Description
Datetime values have a rather complex format as described in datetime.
Some errors in the format are treated as syntax errors, others generate the DateTimeSyntax
error.
Remedy: Fix the datetime value notation.
Examples
A correct datetime value:
rascal>$2013-07-15T09:15:23.123+03:00$;
datetime: $2013-07-15T09:15:23.123+03:00$
Certain errors, like a wrong day number (here: 40) lead to a parse error:
rascal>$2013-07-40T09:15:23.123+03:00$;
^ Parse error here
ok
Others, like a wrong month number (here: 15) lead to a DateTimeSyntax error
rascal>$2010-15-15T09:15:23.123+03:00$;
|prompt:///|(0,31,<1,0>,<1,31>): Invalid datetime input: Cannot create date with provided values.
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/DateTimeSyntax|
ok