A date literal token of the form @YYYY-MM-DD. The @ prefix distinguishes date literals from other values. Month and day components are optional, allowing partial dates such as @2024 or @2024-01.

Examples

Full date

@2024-01-15

Year and month only

@2024-01

Year only

@2024

Used in an interval

Interval[@2020-01-01, @2020-12-31]
Railroad Diagram
100%
@ DATEFORMAT

scroll to zoom · drag to pan · click green rules or blue tokens to navigate

EBNF

DATE
  : '@' DATEFORMAT
  ;

DATEFORMAT
  : [0-9][0-9][0-9][0-9] ('-' [0-9][0-9] ('-' [0-9][0-9])?)?
  ;

Used In