Skip to content

Use Temporal for time stamps #668

@remcohaszing

Description

@remcohaszing

Is your feature request related to a problem? Please describe.
YAML 1.1 defines the !!timestamp tag. This is a way to define date-time values. Currently these are parsed into Date objects. The problem is that YAML timestamps hold time zone information, but the Date object does not. This is a broader problem in the JavaScript ecosystem. It was fixed by the addition of Temporal.ZonedDateTime.

Describe the solution you'd like
I think it would be nice if YAML timestamps are parsed into Temporal.ZonedDateTime instead of Date.

Describe alternatives you've considered
N/A

Additional context
At the moment of writing, Temporal still has very limited availability. It might not be worthwhile to add this until at least all supported versions of Node.js support it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions