mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-13 23:17:05 +00:00
2d84daf064
There is now a dedicated lexer for date literals, which handles ISO 8601 dates (with the T) properly now. Parsing of date patterns is handled in date.rs now, instead of in unit_defs.rs.
22 lines
616 B
Text
22 lines
616 B
Text
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
# ISO 8601 formats
|
|
fullyear-monthnum-day['T'hour24:min:sec[offset]]
|
|
fullyear-monthnum-day[ hour24:min:sec[offset]]
|
|
fullyear-'W'isoweek
|
|
fullyear-ordinal
|
|
--monthnum-day
|
|
|
|
# Dates like "Janaury 1, 1970"
|
|
monthname day[[','] fullyear]
|
|
|
|
# ctime dates
|
|
weekday monthname day[ hour24:min:sec] fullyear
|
|
|
|
# Astronomical dates like "1970 January 1"
|
|
fullyear monthname day[ hour24:min:sec]
|
|
|
|
# Today dates
|
|
hour24:min:sec [offset]
|