Skip to content

🚀 [Feature]: Support !!timestamp parsing #23

@MariusStorhaug

Description

YAML 1.2.2 does not include !!timestamp in its core schema, but it is a widely-used yaml.org type from YAML 1.1 that many tools still emit.

Request

When a scalar matches the timestamp regex (2001-12-15T02:59:43.1Z, 2002-12-14, etc.), resolve it to [datetime] or [datetimeoffset].

ConvertTo-Yaml should emit [datetime] / [datetimeoffset] as ISO 8601 strings.

Spec examples covered

  • Example 2.22 — Timestamps

Notes

Lower priority than the core-schema gaps because it's not in YAML 1.2.2 core. Recommend gating behind a -ParseTimestamps switch (default off) so plain dates like 2024-01-01 keep their string form by default — otherwise scripts that treat YAML strings as strings will break.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions