Skip to content

Commit

Permalink
fix: Update datetime definition/regex to match specification
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Dec 10, 2024
1 parent c17b7f3 commit 7c8a887
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/schema/objects/formats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,18 @@ datetime:
display_name: Datetime
description: |
A datetime in the form `"YYYY-MM-DDThh:mm:ss[.000000][Z]"`,
where [.000000] is an optional subsecond resolution between 1 and 6 decimal points,
and [Z] is an optional, valid timezone code.
pattern: '[0-9]{4}-[0-9]{2}-[0-9]{2}T(?:2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9](\.[0-9]{1,6})?([A-Z]{2,4})?'
where `[.000000]` is an optional subsecond resolution between 1 and 6 decimal points,
and `[Z]` is an optional literal character `Z` that indicates
Coordinated Universal Time (UTC).
pattern: "\
[0-9]{4}\
-(?:0[1-9]|1[0-2])\
-(?:0[1-9]|[12][0-9]|3[01])\
T(?:2[0-3]|[01][0-9])\
:[0-5][0-9]\
:(?:[0-5][0-9]|60)\
(?:\\.[0-9]{1,6})?\
Z?"
file_relative:
display_name: Path relative to the parent file
description: |
Expand Down

0 comments on commit 7c8a887

Please sign in to comment.