Skip to content

Date/time literals #5

Open
Open
@faultyserver

Description

@faultyserver

Something that I think a lot of big languages today are missing is Date literals. ISO 8601 provides an un-ambiguous syntax for specifying dates, though the individual components of the date could be construed as binary operations on integers, or map entries with integer values.

To ensure there is no ambiguity, date literals could be prefixed with a D (or DT explicitly for datetimes):

new_year = D2017-01-01
now = DT2017-06-26 4:15:30Z-05:00

Some disambiguation between optional timezone specifiers and map entry definitions is probably needed, though key interpolation would be used anyway, since a DateTime is not a symbol.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestAny request for a new feature of the language. Includes both syntax and library features.syntaxAny issue relating to the syntax of Myst.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions