Skip to content

Commit 6643607

Browse files
authored
Add a note about datetime semantic validation limitations (#18)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent b394597 commit 6643607

File tree

10 files changed

+10
-0
lines changed

10 files changed

+10
-0
lines changed

schemas/iso/datetime/2019/date/calendar-basic.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Calendar Date (Basic Format)",
44
"description": "A complete representation of a calendar date in basic format [YYYY][MM][DD] (§5.2.2.1 a)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., leap years for February 29) must be performed by the consumer",
56
"examples": [ "19850412", "20000101", "20231231", "00000101", "99991231" ],
67
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
78
"x-links": [ "https://www.iso.org/standard/70907.html" ],

schemas/iso/datetime/2019/date/calendar-expanded-basic.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Calendar Date Expanded (Basic Format)",
44
"description": "An expanded representation of a calendar date in basic format [±][YYYYYY][MM][DD] with six digits for the year (§5.2.2.3 a)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., leap years for February 29) must be performed by the consumer",
56
"examples": [
67
"+0019850412",
78
"-0000010101",

schemas/iso/datetime/2019/date/calendar-expanded-extended.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Calendar Date Expanded (Extended Format)",
44
"description": "An expanded representation of a calendar date in extended format [±][YYYYYY][\"-\"][MM][\"-\"][DD] with six digits for the year (§5.2.2.3 a)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., leap years for February 29) must be performed by the consumer",
56
"examples": [
67
"+001985-04-12",
78
"-000001-01-01",

schemas/iso/datetime/2019/date/calendar-extended.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Calendar Date (Extended Format)",
44
"description": "A complete representation of a calendar date in extended format [YYYY][\"-\"][MM][\"-\"][DD] (§5.2.2.1 b)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., leap years for February 29) must be performed by the consumer",
56
"examples": [
67
"1985-04-12",
78
"2000-01-01",

schemas/iso/datetime/2019/date/week-basic.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Week Date (Basic Format)",
44
"description": "A complete representation of a week date in basic format [YYYY][\"W\"][WW][D] where WW is the calendar week of year (01-53) and D is the calendar day of week (1-7) (§5.2.4.1 a)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., whether a year has 53 weeks) must be performed by the consumer",
56
"examples": [ "1985W155", "2000W011", "2023W527", "0000W011", "9999W537" ],
67
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
78
"x-links": [ "https://www.iso.org/standard/70907.html" ],

schemas/iso/datetime/2019/date/week-expanded-basic.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Week Date Expanded (Basic Format)",
44
"description": "An expanded representation of a week date in basic format [±][YYYYYY][\"W\"][WW][D] with six digits for the year, WW as calendar week of year (01-53), and D as calendar day of week (1-7) (§5.2.4.3 a)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., whether a year has 53 weeks) must be performed by the consumer",
56
"examples": [
67
"+001985W155",
78
"-000001W011",

schemas/iso/datetime/2019/date/week-expanded-extended.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Week Date Expanded (Extended Format)",
44
"description": "An expanded representation of a week date in extended format [±][YYYYYY][\"-\"][\"W\"][WW][\"-\"][D] with six digits for the year, WW as calendar week of year (01-53), and D as calendar day of week (1-7) (§5.2.4.3 a)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., whether a year has 53 weeks) must be performed by the consumer",
56
"examples": [
67
"+001985-W15-5",
78
"-000001-W01-1",

schemas/iso/datetime/2019/date/week-extended.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Week Date (Extended Format)",
44
"description": "A complete representation of a week date in extended format [YYYY][\"-\"][\"W\"][WW][\"-\"][D] where WW is the calendar week of year (01-53) and D is the calendar day of week (1-7) (§5.2.4.1 b)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., whether a year has 53 weeks) must be performed by the consumer",
56
"examples": [
67
"1985-W15-5",
78
"2000-W01-1",

schemas/iso/datetime/2019/duration/calendar-basic.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Duration (Alternative Calendar Basic Format)",
44
"description": "A duration in alternative basic format P[YYYYMMDD]T[HHMMSS] (§5.5.2.4)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., leap years for February 29) must be performed by the consumer",
56
"examples": [ "P00020110T223355", "P00010101T000000", "P00001231T235959" ],
67
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
78
"x-links": [ "https://www.iso.org/standard/70907.html" ],

schemas/iso/datetime/2019/duration/calendar-extended.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"title": "ISO 8601-1:2019 Duration (Alternative Calendar Extended Format)",
44
"description": "A duration in alternative extended format P[YYYY-MM-DD]T[HH:MM:SS] (§5.5.2.4)",
5+
"$comment": "This schema provides syntactic validation only. Semantic validation (e.g., leap years for February 29) must be performed by the consumer",
56
"examples": [
67
"P0002-01-10T22:33:55",
78
"P0001-01-01T00:00:00",

0 commit comments

Comments
 (0)