Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: api/rascal/datetime/extracted
Source used for this grammar: Jurgen J. Vinju, Mark Hills, DateTime
, 2009–2013 [Explore]
datetime
, tuple[datetime date, datetime time]
, interval
, tuple[int,int,int,int,int,int,int]
, Duration
, int
, list[datetime]
, str
), 0 root (—), 7 top (datetime
, tuple[datetime date, datetime time]
, tuple[int,int,int,int,int,int,int]
, Duration
, int
, list[datetime]
, str
), 0 bottom (—).[now]
, [createDate]
, [createTime]
2, [createDateTime]
2, [joinDateAndTime]
, [splitDateTime]
, [incrementYears]
2, [incrementMonths]
2, [incrementDays]
2, [incrementHours]
2, [incrementMinutes]
2, [incrementSeconds]
2, [incrementMilliseconds]
2, [decrementYears]
2, [decrementMonths]
2, [decrementDays]
2, [decrementHours]
2, [decrementMinutes]
2, [decrementSeconds]
2, [decrementMilliseconds]
2, [createInterval]
, [createDurationInternal]
, [createDuration]
2, [daysInInterval]
, [daysDiff]
, [dateRangeByDay]
, [parseDate]
, [parseDateInLocale]
, [parseTime]
, [parseTimeInLocale]
, [parseDateTime]
, [parseDateTimeInLocale]
, [printDate]
2, [printDateInLocale]
2, [printTime]
2, [printTimeInLocale]
2, [printDateTime]
2, [printDateTimeInLocale]
2.⟨year⟩
3, ⟨month⟩
3, ⟨day⟩
3, ⟨hour⟩
4, ⟨minute⟩
4, ⟨second⟩
4, ⟨millisecond⟩
4, ⟨timezoneHourOffset⟩
2, ⟨timezoneMinuteOffset⟩
2, ⟨date⟩
, ⟨time⟩
, ⟨dt⟩
29, ⟨n⟩
14, ⟨begin⟩
4, ⟨end⟩
4, ⟨i⟩
3, ⟨inputDate⟩
6, ⟨formatString⟩
12, ⟨locale⟩
9, ⟨inputTime⟩
6, ⟨inputDateTime⟩
6.datetime ::= [now]::ε
datetime ::= [createDate]::integer ⟨month⟩:integer ⟨day⟩:integer⟨year⟩:
datetime ::= [createTime]::integer ⟨minute⟩:integer ⟨second⟩:integer ⟨millisecond⟩:integer⟨hour⟩:
datetime ::= [createTime]::integer ⟨minute⟩:integer ⟨second⟩:integer ⟨millisecond⟩:integer ⟨timezoneHourOffset⟩:integer ⟨timezoneMinuteOffset⟩:integer⟨hour⟩:
datetime ::= [createDateTime]::integer ⟨month⟩:integer ⟨day⟩:integer ⟨hour⟩:integer ⟨minute⟩:integer ⟨second⟩:integer ⟨millisecond⟩:integer⟨year⟩:
datetime ::= [createDateTime]::integer ⟨month⟩:integer ⟨day⟩:integer ⟨hour⟩:integer ⟨minute⟩:integer ⟨second⟩:integer ⟨millisecond⟩:integer ⟨timezoneHourOffset⟩:integer ⟨timezoneMinuteOffset⟩:integer⟨year⟩:
datetime ::= [joinDateAndTime]::string ⟨time⟩:string⟨date⟩:
tuple[datetime date, datetime time] ::=
[splitDateTime]::⟨dt⟩:string
datetime ::= [incrementYears]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[incrementYears]::⟨dt⟩:string
datetime ::= [incrementMonths]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[incrementMonths]::⟨dt⟩:string
datetime ::= [incrementDays]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[incrementDays]::⟨dt⟩:string
datetime ::= [incrementHours]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[incrementHours]::⟨dt⟩:string
datetime ::= [incrementMinutes]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[incrementMinutes]::⟨dt⟩:string
datetime ::= [incrementSeconds]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[incrementSeconds]::⟨dt⟩:string
datetime ::= [incrementMilliseconds]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[incrementMilliseconds]::⟨dt⟩:string
datetime ::= [decrementYears]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[decrementYears]::⟨dt⟩:string
datetime ::= [decrementMonths]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[decrementMonths]::⟨dt⟩:string
datetime ::= [decrementDays]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[decrementDays]::⟨dt⟩:string
datetime ::= [decrementHours]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[decrementHours]::⟨dt⟩:string
datetime ::= [decrementMinutes]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[decrementMinutes]::⟨dt⟩:string
datetime ::= [decrementSeconds]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[decrementSeconds]::⟨dt⟩:string
datetime ::= [decrementMilliseconds]::string ⟨n⟩:integer⟨dt⟩:
datetime ::=
[decrementMilliseconds]::⟨dt⟩:string
interval ::= [createInterval]::string ⟨end⟩:string⟨begin⟩:
tuple[int,int,int,int,int,int,int] ::= [createDurationInternal]::string ⟨end⟩:string⟨begin⟩:
Duration ::= [createDuration]::string ⟨end⟩:string⟨begin⟩:
Duration ::=
[createDuration]::⟨i⟩:interval
int ::=
[daysInInterval]::⟨i⟩:interval
int ::= [daysDiff]::string ⟨end⟩:string⟨begin⟩:
list[datetime] ::=
[dateRangeByDay]::⟨i⟩:interval
datetime ::= [parseDate]::string ⟨formatString⟩:string⟨inputDate⟩:
datetime ::= [parseDateInLocale]::string ⟨formatString⟩:string ⟨locale⟩:string⟨inputDate⟩:
datetime ::= [parseTime]::string ⟨formatString⟩:string⟨inputTime⟩:
datetime ::= [parseTimeInLocale]::string ⟨formatString⟩:string ⟨locale⟩:string⟨inputTime⟩:
datetime ::= [parseDateTime]::string ⟨formatString⟩:string⟨inputDateTime⟩:
datetime ::= [parseDateTimeInLocale]::string ⟨formatString⟩:string ⟨locale⟩:string⟨inputDateTime⟩:
str ::= [printDate]::string ⟨formatString⟩:string⟨inputDate⟩:
str ::=
[printDate]::⟨inputDate⟩:string
str ::= [printDateInLocale]::string ⟨formatString⟩:string ⟨locale⟩:string⟨inputDate⟩:
str ::= [printDateInLocale]::string ⟨locale⟩:string⟨inputDate⟩:
str ::= [printTime]::string ⟨formatString⟩:string⟨inputTime⟩:
str ::=
[printTime]::⟨inputTime⟩:string
str ::= [printTimeInLocale]::string ⟨formatString⟩:string ⟨locale⟩:string⟨inputTime⟩:
str ::= [printTimeInLocale]::string ⟨locale⟩:string⟨inputTime⟩:
str ::= [printDateTime]::string ⟨formatString⟩:string⟨inputDateTime⟩:
str ::=
[printDateTime]::⟨inputDateTime⟩:string
str ::= [printDateTimeInLocale]::string ⟨formatString⟩:string ⟨locale⟩:string⟨inputDateTime⟩:
str ::= [printDateTimeInLocale]::string ⟨locale⟩:string⟨inputDateTime⟩: