c17971a2d8
* syntax: add datetime validator (and interop tests) * syntax: improve datetime normalization * lexicon: stronger datetime validation (from syntax package) * syntax: make datetime syntax norm test more flexible * make fmt * datetime: docs, normalize and always variant * bsky replace toSimplifiedISOSafe with normalizeDatetimeAlways * more rigorous datetime parsing on record creation * handle negative dates * syntax: disallow datetimes before year 0010 * syntax: datetime normalization functions validate output --------- Co-authored-by: dholms <dtholmgren@gmail.com>
41 lines
1022 B
Plaintext
41 lines
1022 B
Plaintext
# "preferred"
|
|
1985-04-12T23:20:50.123Z
|
|
1985-04-12T23:20:50.000Z
|
|
2000-01-01T00:00:00.000Z
|
|
1985-04-12T23:20:50.123456Z
|
|
1985-04-12T23:20:50.120Z
|
|
1985-04-12T23:20:50.120000Z
|
|
|
|
# "supported"
|
|
1985-04-12T23:20:50.1235678912345Z
|
|
1985-04-12T23:20:50.100Z
|
|
1985-04-12T23:20:50Z
|
|
1985-04-12T23:20:50.0Z
|
|
1985-04-12T23:20:50.123+00:00
|
|
1985-04-12T23:20:50.123-07:00
|
|
1985-04-12T23:20:50.123+07:00
|
|
1985-04-12T23:20:50.123+01:45
|
|
0985-04-12T23:20:50.123-07:00
|
|
1985-04-12T23:20:50.123-07:00
|
|
0123-01-01T00:00:00.000Z
|
|
|
|
# various precisions, up through at least 12 digits
|
|
1985-04-12T23:20:50.1Z
|
|
1985-04-12T23:20:50.12Z
|
|
1985-04-12T23:20:50.123Z
|
|
1985-04-12T23:20:50.1234Z
|
|
1985-04-12T23:20:50.12345Z
|
|
1985-04-12T23:20:50.123456Z
|
|
1985-04-12T23:20:50.1234567Z
|
|
1985-04-12T23:20:50.12345678Z
|
|
1985-04-12T23:20:50.123456789Z
|
|
1985-04-12T23:20:50.1234567890Z
|
|
1985-04-12T23:20:50.12345678901Z
|
|
1985-04-12T23:20:50.123456789012Z
|
|
|
|
# extreme but currently allowed
|
|
0010-12-31T23:00:00.000Z
|
|
1000-12-31T23:00:00.000Z
|
|
1900-12-31T23:00:00.000Z
|
|
3001-12-31T23:00:00.000Z
|