diff --git a/schemas/iso/datetime/2019/time/beginning-day-basic.json b/schemas/iso/datetime/2019/time/beginning-day-basic.json new file mode 100644 index 00000000..8d05dcd8 --- /dev/null +++ b/schemas/iso/datetime/2019/time/beginning-day-basic.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Beginning of the Day (Basic Format)", + "description": "A representation of the beginning of a calendar day in basic format [\"T\"]000000 where the time designator \"T\" may be omitted by mutual agreement (§5.3.2)", + "examples": [ "T000000", "000000" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?000000$" +} diff --git a/schemas/iso/datetime/2019/time/beginning-day-extended.json b/schemas/iso/datetime/2019/time/beginning-day-extended.json new file mode 100644 index 00000000..77987d8f --- /dev/null +++ b/schemas/iso/datetime/2019/time/beginning-day-extended.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Beginning of the Day (Extended Format)", + "description": "A representation of the beginning of a calendar day in extended format 00:00:00 or [\"T\"]00:00:00 where the time designator \"T\" may be omitted by mutual agreement (§5.3.2)", + "examples": [ "00:00:00", "T00:00:00" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?00:00:00$" +} diff --git a/schemas/iso/datetime/2019/time/decimal-hour-basic.json b/schemas/iso/datetime/2019/time/decimal-hour-basic.json new file mode 100644 index 00000000..c9171989 --- /dev/null +++ b/schemas/iso/datetime/2019/time/decimal-hour-basic.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day with Decimal Hour (Basic Format)", + "description": "A representation of local time of day with decimal fraction of hour in basic format [\"T\"][hh][,][n] or [\"T\"][hh][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 e)", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs. Extended format is not applicable for hour-only representations", + "examples": [ "T23,3", "T23.3", "T00,0", "T12.5", "T15,75" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T([01][0-9]|2[0-3])[.,][0-9]+$" +} diff --git a/schemas/iso/datetime/2019/time/decimal-minute-basic.json b/schemas/iso/datetime/2019/time/decimal-minute-basic.json new file mode 100644 index 00000000..5b18f590 --- /dev/null +++ b/schemas/iso/datetime/2019/time/decimal-minute-basic.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day with Decimal Minute (Basic Format)", + "description": "A representation of local time of day with decimal fraction of minute in basic format [\"T\"][hh][mm][,][n] or [\"T\"][hh][mm][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 c)", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs", + "examples": [ "T2320,8", "T2320.8", "T0000,0", "T2359,999", "T1200.5" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T([01][0-9]|2[0-3])[0-5][0-9][.,][0-9]+$" +} diff --git a/schemas/iso/datetime/2019/time/decimal-minute-extended.json b/schemas/iso/datetime/2019/time/decimal-minute-extended.json new file mode 100644 index 00000000..702d09ec --- /dev/null +++ b/schemas/iso/datetime/2019/time/decimal-minute-extended.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day with Decimal Minute (Extended Format)", + "description": "A representation of local time of day with decimal fraction of minute in extended format [hh][:][mm][,][n] or [\"T\"][hh][:][mm][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 d)", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs", + "examples": [ "23:20,8", "T23:20.8", "00:00,0", "T23:59,999", "12:00.5" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?([01][0-9]|2[0-3]):[0-5][0-9][.,][0-9]+$" +} diff --git a/schemas/iso/datetime/2019/time/decimal-second-basic.json b/schemas/iso/datetime/2019/time/decimal-second-basic.json new file mode 100644 index 00000000..73ed0df1 --- /dev/null +++ b/schemas/iso/datetime/2019/time/decimal-second-basic.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day with Decimal Second (Basic Format)", + "description": "A representation of local time of day with decimal fraction of second in basic format [\"T\"][hh][mm][ss][,][n] or [\"T\"][hh][mm][ss][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 a)", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs", + "examples": [ + "T232030,5", + "T232030.5", + "T000000,0", + "T235959,999", + "T120000.123456" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T([01][0-9]|2[0-3])[0-5][0-9]([0-5][0-9]|60)[.,][0-9]+$" +} diff --git a/schemas/iso/datetime/2019/time/decimal-second-extended.json b/schemas/iso/datetime/2019/time/decimal-second-extended.json new file mode 100644 index 00000000..3df947c9 --- /dev/null +++ b/schemas/iso/datetime/2019/time/decimal-second-extended.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day with Decimal Second (Extended Format)", + "description": "A representation of local time of day with decimal fraction of second in extended format [hh][:][mm][:][ss][,][n] or [\"T\"][hh][:][mm][:][ss][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 b)", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs", + "examples": [ + "23:20:30,5", + "T23:20:30.5", + "00:00:00,0", + "T23:59:59,999", + "12:00:00.123456" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)[.,][0-9]+$" +} diff --git a/schemas/iso/datetime/2019/time/hour-basic.json b/schemas/iso/datetime/2019/time/hour-basic.json new file mode 100644 index 00000000..6a51150c --- /dev/null +++ b/schemas/iso/datetime/2019/time/hour-basic.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day - Hour Only (Basic Format)", + "description": "A representation of local time of day with reduced precision to hour only in basic format [\"T\"][hh] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.3 c)", + "$comment": "Extended format is not applicable for hour-only representations as there are no separators to extend", + "examples": [ "T23", "T00", "T12", "T01", "T15" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T([01][0-9]|2[0-3])$" +} diff --git a/schemas/iso/datetime/2019/time/hour-minute-basic.json b/schemas/iso/datetime/2019/time/hour-minute-basic.json new file mode 100644 index 00000000..1f133e36 --- /dev/null +++ b/schemas/iso/datetime/2019/time/hour-minute-basic.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day - Hour and Minute (Basic Format)", + "description": "A representation of local time of day with reduced precision to hour and minute in basic format [\"T\"][hh][mm] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.3 a)", + "examples": [ "T2320", "T0000", "T2359", "T1200", "T0101" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T([01][0-9]|2[0-3])[0-5][0-9]$" +} diff --git a/schemas/iso/datetime/2019/time/hour-minute-extended.json b/schemas/iso/datetime/2019/time/hour-minute-extended.json new file mode 100644 index 00000000..cf38580a --- /dev/null +++ b/schemas/iso/datetime/2019/time/hour-minute-extended.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day - Hour and Minute (Extended Format)", + "description": "A representation of local time of day with reduced precision to hour and minute in extended format [hh][:][mm] or [\"T\"][hh][:][mm] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.3 b)", + "examples": [ "23:20", "T23:20", "00:00", "T23:59", "12:00", "T01:01" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?([01][0-9]|2[0-3]):[0-5][0-9]$" +} diff --git a/schemas/iso/datetime/2019/time/local-day-basic.json b/schemas/iso/datetime/2019/time/local-day-basic.json new file mode 100644 index 00000000..5c30fa51 --- /dev/null +++ b/schemas/iso/datetime/2019/time/local-day-basic.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day (Basic Format)", + "description": "A complete representation of local time of day in basic format [\"T\"][hh][mm][ss] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.2 a)", + "$comment": "This schema provides syntactic validation only. Semantic validation (e.g., leap second validity in specific contexts) must be performed by the consumer", + "examples": [ "T232050", "T000000", "T235960", "T120000", "T010101" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T([01][0-9]|2[0-3])[0-5][0-9]([0-5][0-9]|60)$" +} diff --git a/schemas/iso/datetime/2019/time/local-day-extended.json b/schemas/iso/datetime/2019/time/local-day-extended.json new file mode 100644 index 00000000..87fe39e7 --- /dev/null +++ b/schemas/iso/datetime/2019/time/local-day-extended.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day (Extended Format)", + "description": "A complete representation of local time of day in extended format [hh][:][mm][:][ss] or [\"T\"][hh][:][mm][:][ss] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.2 b)", + "$comment": "This schema provides syntactic validation only. Semantic validation (e.g., leap second validity in specific contexts) must be performed by the consumer", + "examples": [ + "23:20:50", + "T23:20:50", + "00:00:00", + "T23:59:60", + "12:00:00", + "T01:01:01" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)$" +} diff --git a/schemas/iso/datetime/2019/time/local-day-shift-basic.json b/schemas/iso/datetime/2019/time/local-day-shift-basic.json new file mode 100644 index 00000000..7cfe9551 --- /dev/null +++ b/schemas/iso/datetime/2019/time/local-day-shift-basic.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day with Time Shift (Basic Format)", + "description": "A representation of local time of day with time shift from UTC in basic format [\"T\"][hh][mm][ss][±][hh][mm] or [\"T\"][hh][mm][ss][±][hh] or [\"T\"][hh][mm][ss]Z where the time designator \"T\" may be omitted by mutual agreement and the time shift may include hours only or be Z for UTC (§5.3.4.2 a)", + "examples": [ + "T152746+0100", + "T152746-0530", + "T152746Z", + "152746+01", + "T000000+0000", + "235960-1200" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?([01][0-9]|2[0-3])[0-5][0-9]([0-5][0-9]|60)(?:Z|[+-](?:[01][0-9]|2[0-3])(?:[0-5][0-9])?)$" +} diff --git a/schemas/iso/datetime/2019/time/local-day-shift-extended.json b/schemas/iso/datetime/2019/time/local-day-shift-extended.json new file mode 100644 index 00000000..3bb11f32 --- /dev/null +++ b/schemas/iso/datetime/2019/time/local-day-shift-extended.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Local Time of Day with Time Shift (Extended Format)", + "description": "A representation of local time of day with time shift from UTC in extended format [hh][:][mm][:][ss][±][hh][:][mm] or [\"T\"][hh][:][mm][:][ss][±][hh] or [hh][:][mm][:][ss]Z where the time designator \"T\" may be omitted by mutual agreement and the time shift may include hours only or be Z for UTC (§5.3.4.2 b)", + "examples": [ + "15:27:46+01:00", + "T15:27:46-05:30", + "15:27:46Z", + "T15:27:46+01", + "00:00:00+00:00", + "T23:59:60-12:00" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(?:Z|[+-](?:[01][0-9]|2[0-3])(?::[0-5][0-9])?)$" +} diff --git a/schemas/iso/datetime/2019/time/shift-basic.json b/schemas/iso/datetime/2019/time/shift-basic.json new file mode 100644 index 00000000..7254f5f1 --- /dev/null +++ b/schemas/iso/datetime/2019/time/shift-basic.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Time Shift from UTC (Basic Format)", + "description": "A representation of the time shift between local time scale and UTC in basic format [±][hh][mm] or [±][hh] or Z where Z is the UTC designator representing zero shift (§5.3.4.1)", + "examples": [ "+0100", "-0530", "+00", "-12", "Z", "+1400", "-0000" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^(?:Z|[+-](?:[01][0-9]|2[0-3])(?:[0-5][0-9])?)$" +} diff --git a/schemas/iso/datetime/2019/time/shift-extended.json b/schemas/iso/datetime/2019/time/shift-extended.json new file mode 100644 index 00000000..7776bc89 --- /dev/null +++ b/schemas/iso/datetime/2019/time/shift-extended.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 Time Shift from UTC (Extended Format)", + "description": "A representation of the time shift between local time scale and UTC in extended format [±][hh][:][mm] or Z where Z is the UTC designator representing zero shift (§5.3.4.1)", + "$comment": "Extended format is not applicable for hour-only time shifts", + "examples": [ "+01:00", "-05:30", "Z", "+14:00", "-00:00", "+12:45" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])$" +} diff --git a/schemas/iso/datetime/2019/time/utc-day-basic.json b/schemas/iso/datetime/2019/time/utc-day-basic.json new file mode 100644 index 00000000..795069bb --- /dev/null +++ b/schemas/iso/datetime/2019/time/utc-day-basic.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 UTC of Day (Basic Format)", + "description": "A representation of UTC of day in basic format [\"T\"][hh][mm][ss]Z or [\"T\"][hh][mm]Z or [\"T\"][hh]Z where the time designator \"T\" may be omitted by mutual agreement and Z is the UTC designator (§5.3.3 a)", + "examples": [ + "T232030Z", + "T2320Z", + "T23Z", + "232030Z", + "000000Z", + "T120000Z", + "1200Z", + "12Z" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?(?:([01][0-9]|2[0-3])[0-5][0-9]([0-5][0-9]|60)|([01][0-9]|2[0-3])[0-5][0-9]|([01][0-9]|2[0-3]))Z$" +} diff --git a/schemas/iso/datetime/2019/time/utc-day-extended.json b/schemas/iso/datetime/2019/time/utc-day-extended.json new file mode 100644 index 00000000..fa1acba3 --- /dev/null +++ b/schemas/iso/datetime/2019/time/utc-day-extended.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ISO 8601-1:2019 UTC of Day (Extended Format)", + "description": "A representation of UTC of day in extended format [hh][:][mm][:][ss]Z or [\"T\"][hh][:][mm][:][ss]Z or [hh][:][mm]Z or [\"T\"][hh][:][mm]Z where the time designator \"T\" may be omitted by mutual agreement and Z is the UTC designator (§5.3.3 b)", + "$comment": "Extended format is not applicable for hour-only representations", + "examples": [ + "23:20:30Z", + "T23:20:30Z", + "23:20Z", + "T23:20Z", + "00:00:00Z", + "T12:00:00Z", + "12:00Z" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.iso.org/standard/70907.html" ], + "type": "string", + "pattern": "^T?(?:([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)|([01][0-9]|2[0-3]):[0-5][0-9])Z$" +} diff --git a/test/iso/datetime/2019/time/beginning-day-basic.test.json b/test/iso/datetime/2019/time/beginning-day-basic.test.json new file mode 100644 index 00000000..1a35d540 --- /dev/null +++ b/test/iso/datetime/2019/time/beginning-day-basic.test.json @@ -0,0 +1,76 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/beginning-day-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 0, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - T000000", + "data": "T000000", + "valid": true + }, + { + "description": "Valid - 000000 without T", + "data": "000000", + "valid": true + }, + { + "description": "Invalid - lowercase t", + "data": "t000000", + "valid": false + }, + { + "description": "Invalid - any non-zero hour", + "data": "T010000", + "valid": false + }, + { + "description": "Invalid - any non-zero minute", + "data": "T000100", + "valid": false + }, + { + "description": "Invalid - any non-zero second", + "data": "T000001", + "valid": false + }, + { + "description": "Invalid - colons (extended format)", + "data": "T00:00:00", + "valid": false + }, + { + "description": "Invalid - 000000 with colons", + "data": "00:00:00", + "valid": false + }, + { + "description": "Invalid - too few digits", + "data": "T00000", + "valid": false + }, + { + "description": "Invalid - too many digits", + "data": "T0000000", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/beginning-day-extended.test.json b/test/iso/datetime/2019/time/beginning-day-extended.test.json new file mode 100644 index 00000000..39f261b2 --- /dev/null +++ b/test/iso/datetime/2019/time/beginning-day-extended.test.json @@ -0,0 +1,76 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/beginning-day-extended.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 0, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - 00:00:00 without T", + "data": "00:00:00", + "valid": true + }, + { + "description": "Valid - T00:00:00 with T", + "data": "T00:00:00", + "valid": true + }, + { + "description": "Invalid - lowercase t", + "data": "t00:00:00", + "valid": false + }, + { + "description": "Invalid - any non-zero hour", + "data": "01:00:00", + "valid": false + }, + { + "description": "Invalid - any non-zero minute", + "data": "00:01:00", + "valid": false + }, + { + "description": "Invalid - any non-zero second", + "data": "00:00:01", + "valid": false + }, + { + "description": "Invalid - basic format (no colons)", + "data": "T000000", + "valid": false + }, + { + "description": "Invalid - 000000 without colons", + "data": "000000", + "valid": false + }, + { + "description": "Invalid - too few digits", + "data": "00:00:0", + "valid": false + }, + { + "description": "Invalid - too many digits", + "data": "00:00:000", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/decimal-hour-basic.test.json b/test/iso/datetime/2019/time/decimal-hour-basic.test.json new file mode 100644 index 00000000..6f643cde --- /dev/null +++ b/test/iso/datetime/2019/time/decimal-hour-basic.test.json @@ -0,0 +1,111 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/decimal-hour-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 23, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - decimal hour with comma", + "data": "T23,3", + "valid": true + }, + { + "description": "Valid - decimal hour with period", + "data": "T23.3", + "valid": true + }, + { + "description": "Valid - midnight with decimal", + "data": "T00,0", + "valid": true + }, + { + "description": "Valid - T12.5", + "data": "T12.5", + "valid": true + }, + { + "description": "Valid - multiple decimal digits", + "data": "T15,75", + "valid": true + }, + { + "description": "Invalid - no decimal part", + "data": "T23", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits", + "data": "T23,", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits (period)", + "data": "T23.", + "valid": false + }, + { + "description": "Invalid - missing T designator", + "data": "23,3", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t23,3", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "T24,0", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "T99,0", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "T00,0", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "T23,0", + "valid": true + }, + { + "description": "Invalid - includes minutes", + "data": "T2320,5", + "valid": false + }, + { + "description": "Invalid - with colon", + "data": "T23:30,5", + "valid": false + }, + { + "description": "Invalid - with Z designator", + "data": "T23,3Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "T23,3+01", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/decimal-minute-basic.test.json b/test/iso/datetime/2019/time/decimal-minute-basic.test.json new file mode 100644 index 00000000..486e43a3 --- /dev/null +++ b/test/iso/datetime/2019/time/decimal-minute-basic.test.json @@ -0,0 +1,131 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/decimal-minute-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 2320, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - decimal minute with comma", + "data": "T2320,8", + "valid": true + }, + { + "description": "Valid - decimal minute with period", + "data": "T2320.8", + "valid": true + }, + { + "description": "Valid - midnight with decimal", + "data": "T0000,0", + "valid": true + }, + { + "description": "Valid - multiple decimal digits", + "data": "T2359,999", + "valid": true + }, + { + "description": "Valid - T1200.5", + "data": "T1200.5", + "valid": true + }, + { + "description": "Invalid - no decimal part", + "data": "T2320", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits", + "data": "T2320,", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits (period)", + "data": "T2320.", + "valid": false + }, + { + "description": "Invalid - missing T designator", + "data": "2320,8", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t2320,8", + "valid": false + }, + { + "description": "Invalid - colons (extended format)", + "data": "T23:20,8", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "T2400,0", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "T9900,0", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "T0060,0", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "T0099,0", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "T0000,0", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "T2300,0", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "T0000,0", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "T0059,0", + "valid": true + }, + { + "description": "Invalid - includes seconds", + "data": "T232030,5", + "valid": false + }, + { + "description": "Invalid - with Z designator", + "data": "T2320,8Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "T2320,8+0100", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/decimal-minute-extended.test.json b/test/iso/datetime/2019/time/decimal-minute-extended.test.json new file mode 100644 index 00000000..a0d8717c --- /dev/null +++ b/test/iso/datetime/2019/time/decimal-minute-extended.test.json @@ -0,0 +1,126 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/decimal-minute-extended.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 2320, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - decimal minute with comma, no T", + "data": "23:20,8", + "valid": true + }, + { + "description": "Valid - decimal minute with period and T", + "data": "T23:20.8", + "valid": true + }, + { + "description": "Valid - midnight with decimal", + "data": "00:00,0", + "valid": true + }, + { + "description": "Valid - multiple decimal digits", + "data": "T23:59,999", + "valid": true + }, + { + "description": "Valid - 12:00.5", + "data": "12:00.5", + "valid": true + }, + { + "description": "Invalid - no decimal part", + "data": "23:20", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits", + "data": "23:20,", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits (period)", + "data": "23:20.", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t23:20,8", + "valid": false + }, + { + "description": "Invalid - basic format (no colons)", + "data": "T2320,8", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "24:00,0", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "99:00,0", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "00:60,0", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "00:99,0", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "00:00,0", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "23:00,0", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "00:00,0", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "00:59,0", + "valid": true + }, + { + "description": "Invalid - includes seconds", + "data": "23:20:30,5", + "valid": false + }, + { + "description": "Invalid - with Z designator", + "data": "23:20,8Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "23:20,8+01:00", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/decimal-second-basic.test.json b/test/iso/datetime/2019/time/decimal-second-basic.test.json new file mode 100644 index 00000000..53080fca --- /dev/null +++ b/test/iso/datetime/2019/time/decimal-second-basic.test.json @@ -0,0 +1,171 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/decimal-second-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 232030, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - decimal second with comma", + "data": "T232030,5", + "valid": true + }, + { + "description": "Valid - decimal second with period", + "data": "T232030.5", + "valid": true + }, + { + "description": "Valid - midnight with decimal", + "data": "T000000,0", + "valid": true + }, + { + "description": "Valid - multiple decimal digits with comma", + "data": "T235959,999", + "valid": true + }, + { + "description": "Valid - multiple decimal digits with period", + "data": "T120000.123456", + "valid": true + }, + { + "description": "Valid - single decimal digit", + "data": "T120000,1", + "valid": true + }, + { + "description": "Valid - many decimal digits", + "data": "T120000.123456789", + "valid": true + }, + { + "description": "Invalid - no decimal part", + "data": "T232030", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits", + "data": "T232030,", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits (period)", + "data": "T232030.", + "valid": false + }, + { + "description": "Invalid - missing T designator", + "data": "232030,5", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t232030,5", + "valid": false + }, + { + "description": "Invalid - colons (extended format)", + "data": "T23:20:30,5", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "T240000,0", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "T990000,0", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "T006000,0", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "T009900,0", + "valid": false + }, + { + "description": "Invalid - second 61", + "data": "T000061,0", + "valid": false + }, + { + "description": "Invalid - second 99", + "data": "T000099,0", + "valid": false + }, + { + "description": "Valid - leap second with decimal", + "data": "T235960,5", + "valid": true + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "T000000,0", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "T230000,0", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "T000000,0", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "T005900,0", + "valid": true + }, + { + "description": "Valid - second 00 (minimum)", + "data": "T000000,0", + "valid": true + }, + { + "description": "Valid - second 59", + "data": "T000059,0", + "valid": true + }, + { + "description": "Valid - second 60 (leap second)", + "data": "T000060,0", + "valid": true + }, + { + "description": "Invalid - both comma and period", + "data": "T232030,5.5", + "valid": false + }, + { + "description": "Invalid - with Z designator", + "data": "T232030,5Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "T232030,5+0100", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/decimal-second-extended.test.json b/test/iso/datetime/2019/time/decimal-second-extended.test.json new file mode 100644 index 00000000..d2487926 --- /dev/null +++ b/test/iso/datetime/2019/time/decimal-second-extended.test.json @@ -0,0 +1,166 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/decimal-second-extended.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 232030, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - decimal second with comma, no T", + "data": "23:20:30,5", + "valid": true + }, + { + "description": "Valid - decimal second with period and T", + "data": "T23:20:30.5", + "valid": true + }, + { + "description": "Valid - midnight with decimal", + "data": "00:00:00,0", + "valid": true + }, + { + "description": "Valid - multiple decimal digits with comma", + "data": "T23:59:59,999", + "valid": true + }, + { + "description": "Valid - multiple decimal digits with period", + "data": "12:00:00.123456", + "valid": true + }, + { + "description": "Valid - single decimal digit", + "data": "12:00:00,1", + "valid": true + }, + { + "description": "Valid - many decimal digits", + "data": "T12:00:00.123456789", + "valid": true + }, + { + "description": "Invalid - no decimal part", + "data": "23:20:30", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits", + "data": "23:20:30,", + "valid": false + }, + { + "description": "Invalid - decimal sign without digits (period)", + "data": "23:20:30.", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t23:20:30,5", + "valid": false + }, + { + "description": "Invalid - basic format (no colons)", + "data": "T232030,5", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "24:00:00,0", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "99:00:00,0", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "00:60:00,0", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "00:99:00,0", + "valid": false + }, + { + "description": "Invalid - second 61", + "data": "00:00:61,0", + "valid": false + }, + { + "description": "Invalid - second 99", + "data": "00:00:99,0", + "valid": false + }, + { + "description": "Valid - leap second with decimal", + "data": "23:59:60,5", + "valid": true + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "00:00:00,0", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "23:00:00,0", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "00:00:00,0", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "00:59:00,0", + "valid": true + }, + { + "description": "Valid - second 00 (minimum)", + "data": "00:00:00,0", + "valid": true + }, + { + "description": "Valid - second 59", + "data": "00:00:59,0", + "valid": true + }, + { + "description": "Valid - second 60 (leap second)", + "data": "00:00:60,0", + "valid": true + }, + { + "description": "Invalid - both comma and period", + "data": "23:20:30,5.5", + "valid": false + }, + { + "description": "Invalid - with Z designator", + "data": "23:20:30,5Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "23:20:30,5+01:00", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/hour-basic.test.json b/test/iso/datetime/2019/time/hour-basic.test.json new file mode 100644 index 00000000..7a72f36f --- /dev/null +++ b/test/iso/datetime/2019/time/hour-basic.test.json @@ -0,0 +1,106 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/hour-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 23, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - T23", + "data": "T23", + "valid": true + }, + { + "description": "Valid - midnight T00", + "data": "T00", + "valid": true + }, + { + "description": "Valid - noon T12", + "data": "T12", + "valid": true + }, + { + "description": "Valid - T01", + "data": "T01", + "valid": true + }, + { + "description": "Valid - T15", + "data": "T15", + "valid": true + }, + { + "description": "Invalid - missing T designator", + "data": "23", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t23", + "valid": false + }, + { + "description": "Invalid - too few digits", + "data": "T2", + "valid": false + }, + { + "description": "Invalid - too many digits (includes minutes)", + "data": "T2320", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "T24", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "T99", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "T00", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "T23", + "valid": true + }, + { + "description": "Invalid - with Z designator", + "data": "T23Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "T23+01", + "valid": false + }, + { + "description": "Invalid - decimal hour", + "data": "T23.5", + "valid": false + }, + { + "description": "Invalid - with colon", + "data": "T2:3", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/hour-minute-basic.test.json b/test/iso/datetime/2019/time/hour-minute-basic.test.json new file mode 100644 index 00000000..58eafa90 --- /dev/null +++ b/test/iso/datetime/2019/time/hour-minute-basic.test.json @@ -0,0 +1,126 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/hour-minute-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 2320, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - T23:20", + "data": "T2320", + "valid": true + }, + { + "description": "Valid - midnight T00:00", + "data": "T0000", + "valid": true + }, + { + "description": "Valid - T23:59", + "data": "T2359", + "valid": true + }, + { + "description": "Valid - noon T12:00", + "data": "T1200", + "valid": true + }, + { + "description": "Valid - T01:01", + "data": "T0101", + "valid": true + }, + { + "description": "Invalid - missing T designator", + "data": "2320", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t2320", + "valid": false + }, + { + "description": "Invalid - colons (extended format)", + "data": "T23:20", + "valid": false + }, + { + "description": "Invalid - too few digits", + "data": "T232", + "valid": false + }, + { + "description": "Invalid - too many digits (includes seconds)", + "data": "T232050", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "T2400", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "T9900", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "T0060", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "T0099", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "T0000", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "T2300", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "T0000", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "T0059", + "valid": true + }, + { + "description": "Invalid - with Z designator", + "data": "T2320Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "T2320+0100", + "valid": false + }, + { + "description": "Invalid - decimal minutes", + "data": "T2320.5", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/hour-minute-extended.test.json b/test/iso/datetime/2019/time/hour-minute-extended.test.json new file mode 100644 index 00000000..8ab1d69b --- /dev/null +++ b/test/iso/datetime/2019/time/hour-minute-extended.test.json @@ -0,0 +1,131 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/hour-minute-extended.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 2320, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - 23:20 without T", + "data": "23:20", + "valid": true + }, + { + "description": "Valid - T23:20 with T", + "data": "T23:20", + "valid": true + }, + { + "description": "Valid - midnight 00:00", + "data": "00:00", + "valid": true + }, + { + "description": "Valid - T23:59", + "data": "T23:59", + "valid": true + }, + { + "description": "Valid - noon 12:00", + "data": "12:00", + "valid": true + }, + { + "description": "Valid - T01:01", + "data": "T01:01", + "valid": true + }, + { + "description": "Invalid - lowercase t", + "data": "t23:20", + "valid": false + }, + { + "description": "Invalid - basic format (no colons)", + "data": "T2320", + "valid": false + }, + { + "description": "Invalid - too few digits", + "data": "23:2", + "valid": false + }, + { + "description": "Invalid - too many digits (includes seconds)", + "data": "23:20:50", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "24:00", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "99:00", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "00:60", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "00:99", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "00:00", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "23:00", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "00:00", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "00:59", + "valid": true + }, + { + "description": "Invalid - with Z designator", + "data": "23:20Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "23:20+01:00", + "valid": false + }, + { + "description": "Invalid - decimal minutes", + "data": "23:20.5", + "valid": false + }, + { + "description": "Invalid - missing colon", + "data": "2320", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/local-day-basic.test.json b/test/iso/datetime/2019/time/local-day-basic.test.json new file mode 100644 index 00000000..28426f7d --- /dev/null +++ b/test/iso/datetime/2019/time/local-day-basic.test.json @@ -0,0 +1,206 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/local-day-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 232050, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - 23:20:50", + "data": "T232050", + "valid": true + }, + { + "description": "Valid - midnight 00:00:00", + "data": "T000000", + "valid": true + }, + { + "description": "Valid - leap second 23:59:60", + "data": "T235960", + "valid": true + }, + { + "description": "Valid - noon 12:00:00", + "data": "T120000", + "valid": true + }, + { + "description": "Valid - 01:01:01", + "data": "T010101", + "valid": true + }, + { + "description": "Valid - end of day 23:59:59", + "data": "T235959", + "valid": true + }, + { + "description": "Invalid - missing T designator", + "data": "232050", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t232050", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - colons (extended format)", + "data": "T23:20:50", + "valid": false + }, + { + "description": "Invalid - spaces in time", + "data": "T23 20 50", + "valid": false + }, + { + "description": "Invalid - too few digits", + "data": "T23205", + "valid": false + }, + { + "description": "Invalid - too many digits", + "data": "T2320500", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "T240000", + "valid": false + }, + { + "description": "Invalid - hour 25", + "data": "T250000", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "T990000", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "T006000", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "T009900", + "valid": false + }, + { + "description": "Invalid - second 61", + "data": "T000061", + "valid": false + }, + { + "description": "Invalid - second 99", + "data": "T000099", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "T000000", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "T230000", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "T000000", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "T005900", + "valid": true + }, + { + "description": "Valid - second 00 (minimum)", + "data": "T000000", + "valid": true + }, + { + "description": "Valid - second 59", + "data": "T000059", + "valid": true + }, + { + "description": "Valid - second 60 (leap second)", + "data": "T000060", + "valid": true + }, + { + "description": "Invalid - hour without leading zero", + "data": "T10000", + "valid": false + }, + { + "description": "Invalid - minute without leading zero", + "data": "T00100", + "valid": false + }, + { + "description": "Invalid - second without leading zero", + "data": "T00001", + "valid": false + }, + { + "description": "Invalid - with Z designator", + "data": "T232050Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "T232050+0100", + "valid": false + }, + { + "description": "Invalid - decimal seconds", + "data": "T232050.5", + "valid": false + }, + { + "description": "Invalid - partial time (hour and minute only)", + "data": "T2320", + "valid": false + }, + { + "description": "Invalid - partial time (hour only)", + "data": "T23", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/local-day-extended.test.json b/test/iso/datetime/2019/time/local-day-extended.test.json new file mode 100644 index 00000000..a6bcb72c --- /dev/null +++ b/test/iso/datetime/2019/time/local-day-extended.test.json @@ -0,0 +1,216 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/local-day-extended.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 232050, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Invalid type - array", + "data": [], + "valid": false + }, + { + "description": "Invalid type - object", + "data": {}, + "valid": false + }, + { + "description": "Valid - 23:20:50 without T", + "data": "23:20:50", + "valid": true + }, + { + "description": "Valid - T23:20:50 with T", + "data": "T23:20:50", + "valid": true + }, + { + "description": "Valid - midnight 00:00:00", + "data": "00:00:00", + "valid": true + }, + { + "description": "Valid - leap second T23:59:60", + "data": "T23:59:60", + "valid": true + }, + { + "description": "Valid - noon 12:00:00", + "data": "12:00:00", + "valid": true + }, + { + "description": "Valid - T01:01:01", + "data": "T01:01:01", + "valid": true + }, + { + "description": "Valid - end of day 23:59:59", + "data": "23:59:59", + "valid": true + }, + { + "description": "Invalid - lowercase t", + "data": "t23:20:50", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - basic format (no colons)", + "data": "T232050", + "valid": false + }, + { + "description": "Invalid - spaces in time", + "data": "23 20 50", + "valid": false + }, + { + "description": "Invalid - too few digits", + "data": "23:20:5", + "valid": false + }, + { + "description": "Invalid - too many digits", + "data": "23:20:500", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "24:00:00", + "valid": false + }, + { + "description": "Invalid - hour 25", + "data": "25:00:00", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "99:00:00", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "00:60:00", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "00:99:00", + "valid": false + }, + { + "description": "Invalid - second 61", + "data": "00:00:61", + "valid": false + }, + { + "description": "Invalid - second 99", + "data": "00:00:99", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "00:00:00", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "23:00:00", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "00:00:00", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "00:59:00", + "valid": true + }, + { + "description": "Valid - second 00 (minimum)", + "data": "00:00:00", + "valid": true + }, + { + "description": "Valid - second 59", + "data": "00:00:59", + "valid": true + }, + { + "description": "Valid - second 60 (leap second)", + "data": "00:00:60", + "valid": true + }, + { + "description": "Invalid - hour without leading zero", + "data": "1:00:00", + "valid": false + }, + { + "description": "Invalid - minute without leading zero", + "data": "00:1:00", + "valid": false + }, + { + "description": "Invalid - second without leading zero", + "data": "00:00:1", + "valid": false + }, + { + "description": "Invalid - with Z designator", + "data": "23:20:50Z", + "valid": false + }, + { + "description": "Invalid - with time shift", + "data": "23:20:50+01:00", + "valid": false + }, + { + "description": "Invalid - decimal seconds", + "data": "23:20:50.5", + "valid": false + }, + { + "description": "Invalid - partial time (hour and minute only)", + "data": "23:20", + "valid": false + }, + { + "description": "Invalid - partial time (hour only)", + "data": "T23", + "valid": false + }, + { + "description": "Invalid - missing colons", + "data": "232050", + "valid": false + }, + { + "description": "Invalid - only one colon", + "data": "23:2050", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/local-day-shift-basic.test.json b/test/iso/datetime/2019/time/local-day-shift-basic.test.json new file mode 100644 index 00000000..f8063479 --- /dev/null +++ b/test/iso/datetime/2019/time/local-day-shift-basic.test.json @@ -0,0 +1,181 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/local-day-shift-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 152746, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - time with hour-minute shift and T", + "data": "T152746+0100", + "valid": true + }, + { + "description": "Valid - time with hour-minute shift, no T", + "data": "152746-0530", + "valid": true + }, + { + "description": "Valid - time with Z and T", + "data": "T152746Z", + "valid": true + }, + { + "description": "Valid - time with hour-only shift, no T", + "data": "152746+01", + "valid": true + }, + { + "description": "Valid - midnight with zero shift", + "data": "T000000+0000", + "valid": true + }, + { + "description": "Valid - leap second with negative shift", + "data": "235960-1200", + "valid": true + }, + { + "description": "Valid - time with Z, no T", + "data": "152746Z", + "valid": true + }, + { + "description": "Valid - time with hour-only shift and T", + "data": "T120000+05", + "valid": true + }, + { + "description": "Invalid - lowercase t", + "data": "t152746+0100", + "valid": false + }, + { + "description": "Invalid - lowercase z", + "data": "T152746z", + "valid": false + }, + { + "description": "Invalid - missing shift", + "data": "T152746", + "valid": false + }, + { + "description": "Invalid - colons in time (extended format)", + "data": "T15:27:46+0100", + "valid": false + }, + { + "description": "Invalid - colons in shift (extended format)", + "data": "T152746+01:00", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "T240000+0100", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "T990000+0100", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "T006000+0100", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "T009900+0100", + "valid": false + }, + { + "description": "Invalid - second 61", + "data": "T000061+0100", + "valid": false + }, + { + "description": "Invalid - second 99", + "data": "T000099+0100", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "T000000Z", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "T230000Z", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "T000000Z", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "T005900Z", + "valid": true + }, + { + "description": "Valid - second 00 (minimum)", + "data": "T000000Z", + "valid": true + }, + { + "description": "Valid - second 59", + "data": "T000059Z", + "valid": true + }, + { + "description": "Valid - second 60 (leap second)", + "data": "T000060Z", + "valid": true + }, + { + "description": "Invalid - shift hour 24", + "data": "T120000+2400", + "valid": false + }, + { + "description": "Invalid - shift minute 60", + "data": "T120000+0060", + "valid": false + }, + { + "description": "Valid - maximum positive shift", + "data": "T120000+1400", + "valid": true + }, + { + "description": "Valid - negative shift", + "data": "T120000-0500", + "valid": true + }, + { + "description": "Invalid - partial time (hour-minute only)", + "data": "T1527+0100", + "valid": false + }, + { + "description": "Invalid - decimal seconds", + "data": "T152746.5+0100", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/local-day-shift-extended.test.json b/test/iso/datetime/2019/time/local-day-shift-extended.test.json new file mode 100644 index 00000000..ce323b25 --- /dev/null +++ b/test/iso/datetime/2019/time/local-day-shift-extended.test.json @@ -0,0 +1,181 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/local-day-shift-extended.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 152746, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - time with hour-minute shift, no T", + "data": "15:27:46+01:00", + "valid": true + }, + { + "description": "Valid - time with hour-minute shift and T", + "data": "T15:27:46-05:30", + "valid": true + }, + { + "description": "Valid - time with Z, no T", + "data": "15:27:46Z", + "valid": true + }, + { + "description": "Valid - time with hour-only shift and T", + "data": "T15:27:46+01", + "valid": true + }, + { + "description": "Valid - midnight with zero shift", + "data": "00:00:00+00:00", + "valid": true + }, + { + "description": "Valid - leap second with negative shift", + "data": "T23:59:60-12:00", + "valid": true + }, + { + "description": "Valid - time with Z and T", + "data": "T15:27:46Z", + "valid": true + }, + { + "description": "Valid - time with hour-only shift, no T", + "data": "12:00:00+05", + "valid": true + }, + { + "description": "Invalid - lowercase t", + "data": "t15:27:46+01:00", + "valid": false + }, + { + "description": "Invalid - lowercase z", + "data": "15:27:46z", + "valid": false + }, + { + "description": "Invalid - missing shift", + "data": "15:27:46", + "valid": false + }, + { + "description": "Invalid - basic format time (no colons in time)", + "data": "T152746+01:00", + "valid": false + }, + { + "description": "Invalid - basic format shift (no colons in shift)", + "data": "15:27:46+0100", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "24:00:00+01:00", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "99:00:00+01:00", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "00:60:00+01:00", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "00:99:00+01:00", + "valid": false + }, + { + "description": "Invalid - second 61", + "data": "00:00:61+01:00", + "valid": false + }, + { + "description": "Invalid - second 99", + "data": "00:00:99+01:00", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "00:00:00Z", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "23:00:00Z", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "00:00:00Z", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "00:59:00Z", + "valid": true + }, + { + "description": "Valid - second 00 (minimum)", + "data": "00:00:00Z", + "valid": true + }, + { + "description": "Valid - second 59", + "data": "00:00:59Z", + "valid": true + }, + { + "description": "Valid - second 60 (leap second)", + "data": "00:00:60Z", + "valid": true + }, + { + "description": "Invalid - shift hour 24", + "data": "12:00:00+24:00", + "valid": false + }, + { + "description": "Invalid - shift minute 60", + "data": "12:00:00+00:60", + "valid": false + }, + { + "description": "Valid - maximum positive shift", + "data": "12:00:00+14:00", + "valid": true + }, + { + "description": "Valid - negative shift", + "data": "12:00:00-05:00", + "valid": true + }, + { + "description": "Invalid - partial time (hour-minute only)", + "data": "15:27+01:00", + "valid": false + }, + { + "description": "Invalid - decimal seconds", + "data": "15:27:46.5+01:00", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/shift-basic.test.json b/test/iso/datetime/2019/time/shift-basic.test.json new file mode 100644 index 00000000..4c3e8408 --- /dev/null +++ b/test/iso/datetime/2019/time/shift-basic.test.json @@ -0,0 +1,146 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/shift-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 100, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - positive shift hour and minute", + "data": "+0100", + "valid": true + }, + { + "description": "Valid - negative shift hour and minute", + "data": "-0530", + "valid": true + }, + { + "description": "Valid - positive shift hour only", + "data": "+00", + "valid": true + }, + { + "description": "Valid - negative shift hour only", + "data": "-12", + "valid": true + }, + { + "description": "Valid - Z (UTC)", + "data": "Z", + "valid": true + }, + { + "description": "Valid - maximum positive shift", + "data": "+1400", + "valid": true + }, + { + "description": "Valid - zero shift", + "data": "-0000", + "valid": true + }, + { + "description": "Valid - positive zero", + "data": "+0000", + "valid": true + }, + { + "description": "Invalid - lowercase z", + "data": "z", + "valid": false + }, + { + "description": "Invalid - missing sign", + "data": "0100", + "valid": false + }, + { + "description": "Invalid - colons (extended format)", + "data": "+01:00", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "+2400", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "+9900", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "+0060", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "+0099", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "+0000", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "+2300", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "+0000", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "+0059", + "valid": true + }, + { + "description": "Invalid - three digits", + "data": "+010", + "valid": false + }, + { + "description": "Invalid - too many digits", + "data": "+01000", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - sign only", + "data": "+", + "valid": false + }, + { + "description": "Valid - negative hour only", + "data": "-05", + "valid": true + }, + { + "description": "Valid - positive hour only", + "data": "+01", + "valid": true + } + ] +} diff --git a/test/iso/datetime/2019/time/shift-extended.test.json b/test/iso/datetime/2019/time/shift-extended.test.json new file mode 100644 index 00000000..ebae49ca --- /dev/null +++ b/test/iso/datetime/2019/time/shift-extended.test.json @@ -0,0 +1,131 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/shift-extended.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 100, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - positive shift hour and minute", + "data": "+01:00", + "valid": true + }, + { + "description": "Valid - negative shift hour and minute", + "data": "-05:30", + "valid": true + }, + { + "description": "Valid - Z (UTC)", + "data": "Z", + "valid": true + }, + { + "description": "Valid - maximum positive shift", + "data": "+14:00", + "valid": true + }, + { + "description": "Valid - zero shift", + "data": "-00:00", + "valid": true + }, + { + "description": "Valid - positive zero", + "data": "+00:00", + "valid": true + }, + { + "description": "Valid - +12:45", + "data": "+12:45", + "valid": true + }, + { + "description": "Invalid - lowercase z", + "data": "z", + "valid": false + }, + { + "description": "Invalid - missing sign", + "data": "01:00", + "valid": false + }, + { + "description": "Invalid - basic format (no colons)", + "data": "+0100", + "valid": false + }, + { + "description": "Invalid - hour only (extended format not applicable)", + "data": "+01", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "+24:00", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "+99:00", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "+00:60", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "+00:99", + "valid": false + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "+00:00", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "+23:00", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "+00:00", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "+00:59", + "valid": true + }, + { + "description": "Invalid - missing colon", + "data": "+0100", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - sign only", + "data": "+", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/utc-day-basic.test.json b/test/iso/datetime/2019/time/utc-day-basic.test.json new file mode 100644 index 00000000..ebacb522 --- /dev/null +++ b/test/iso/datetime/2019/time/utc-day-basic.test.json @@ -0,0 +1,166 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/utc-day-basic.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 232030, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - complete time with Z and T", + "data": "T232030Z", + "valid": true + }, + { + "description": "Valid - hour and minute with Z and T", + "data": "T2320Z", + "valid": true + }, + { + "description": "Valid - hour only with Z and T", + "data": "T23Z", + "valid": true + }, + { + "description": "Valid - complete time with Z, no T", + "data": "232030Z", + "valid": true + }, + { + "description": "Valid - midnight", + "data": "T000000Z", + "valid": true + }, + { + "description": "Valid - noon", + "data": "T120000Z", + "valid": true + }, + { + "description": "Valid - hour-minute no T", + "data": "1200Z", + "valid": true + }, + { + "description": "Valid - hour only no T", + "data": "12Z", + "valid": true + }, + { + "description": "Invalid - lowercase z", + "data": "T232030z", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t232030Z", + "valid": false + }, + { + "description": "Invalid - missing Z", + "data": "T232030", + "valid": false + }, + { + "description": "Invalid - colons (extended format)", + "data": "T23:20:30Z", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "T240000Z", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "T990000Z", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "T006000Z", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "T009900Z", + "valid": false + }, + { + "description": "Invalid - second 61", + "data": "T000061Z", + "valid": false + }, + { + "description": "Invalid - second 99", + "data": "T000099Z", + "valid": false + }, + { + "description": "Valid - leap second", + "data": "T235960Z", + "valid": true + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "T000000Z", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "T230000Z", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "T000000Z", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "T005900Z", + "valid": true + }, + { + "description": "Valid - second 00 (minimum)", + "data": "T000000Z", + "valid": true + }, + { + "description": "Valid - second 59", + "data": "T000059Z", + "valid": true + }, + { + "description": "Valid - second 60 (leap second)", + "data": "T000060Z", + "valid": true + }, + { + "description": "Invalid - with time shift instead of Z", + "data": "T232030+0100", + "valid": false + }, + { + "description": "Invalid - decimal seconds", + "data": "T232030.5Z", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + } + ] +} diff --git a/test/iso/datetime/2019/time/utc-day-extended.test.json b/test/iso/datetime/2019/time/utc-day-extended.test.json new file mode 100644 index 00000000..5e7a7896 --- /dev/null +++ b/test/iso/datetime/2019/time/utc-day-extended.test.json @@ -0,0 +1,166 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../../schemas/iso/datetime/2019/time/utc-day-extended.json", + "tests": [ + { + "description": "Invalid type - integer", + "data": 232030, + "valid": false + }, + { + "description": "Invalid type - boolean", + "data": true, + "valid": false + }, + { + "description": "Invalid type - null", + "data": null, + "valid": false + }, + { + "description": "Valid - complete time with Z, no T", + "data": "23:20:30Z", + "valid": true + }, + { + "description": "Valid - complete time with Z and T", + "data": "T23:20:30Z", + "valid": true + }, + { + "description": "Valid - hour and minute with Z, no T", + "data": "23:20Z", + "valid": true + }, + { + "description": "Valid - hour and minute with Z and T", + "data": "T23:20Z", + "valid": true + }, + { + "description": "Valid - midnight", + "data": "00:00:00Z", + "valid": true + }, + { + "description": "Valid - noon with T", + "data": "T12:00:00Z", + "valid": true + }, + { + "description": "Valid - hour-minute", + "data": "12:00Z", + "valid": true + }, + { + "description": "Invalid - lowercase z", + "data": "23:20:30z", + "valid": false + }, + { + "description": "Invalid - lowercase t", + "data": "t23:20:30Z", + "valid": false + }, + { + "description": "Invalid - missing Z", + "data": "23:20:30", + "valid": false + }, + { + "description": "Invalid - basic format (no colons)", + "data": "T232030Z", + "valid": false + }, + { + "description": "Invalid - hour only (extended format not applicable)", + "data": "T23Z", + "valid": false + }, + { + "description": "Invalid - hour only without T", + "data": "23Z", + "valid": false + }, + { + "description": "Invalid - hour 24", + "data": "24:00:00Z", + "valid": false + }, + { + "description": "Invalid - hour 99", + "data": "99:00:00Z", + "valid": false + }, + { + "description": "Invalid - minute 60", + "data": "00:60:00Z", + "valid": false + }, + { + "description": "Invalid - minute 99", + "data": "00:99:00Z", + "valid": false + }, + { + "description": "Invalid - second 61", + "data": "00:00:61Z", + "valid": false + }, + { + "description": "Invalid - second 99", + "data": "00:00:99Z", + "valid": false + }, + { + "description": "Valid - leap second", + "data": "23:59:60Z", + "valid": true + }, + { + "description": "Valid - hour 00 (minimum)", + "data": "00:00:00Z", + "valid": true + }, + { + "description": "Valid - hour 23 (maximum)", + "data": "23:00:00Z", + "valid": true + }, + { + "description": "Valid - minute 00 (minimum)", + "data": "00:00:00Z", + "valid": true + }, + { + "description": "Valid - minute 59 (maximum)", + "data": "00:59:00Z", + "valid": true + }, + { + "description": "Valid - second 00 (minimum)", + "data": "00:00:00Z", + "valid": true + }, + { + "description": "Valid - second 59", + "data": "00:00:59Z", + "valid": true + }, + { + "description": "Valid - second 60 (leap second)", + "data": "00:00:60Z", + "valid": true + }, + { + "description": "Invalid - with time shift instead of Z", + "data": "23:20:30+01:00", + "valid": false + }, + { + "description": "Invalid - decimal seconds", + "data": "23:20:30.5Z", + "valid": false + } + ] +}