From 40638ed7522cc0458f17a387170630d333a7ad8f Mon Sep 17 00:00:00 2001 From: David Waltermire Date: Wed, 24 Aug 2022 12:47:17 -0400 Subject: [PATCH] Updated date-time regular expressions per usnistgov/metaschema#224. Fixes usnistgov/metaschema#224. (#229) --- schema/json/metaschema-datatypes.json | 4 ++-- schema/xml/metaschema-datatypes.xsd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/schema/json/metaschema-datatypes.json b/schema/json/metaschema-datatypes.json index 180f86333..b93a29199 100644 --- a/schema/json/metaschema-datatypes.json +++ b/schema/json/metaschema-datatypes.json @@ -22,12 +22,12 @@ }, "DateTimeDatatype": { "type": "string", - "pattern": "^(((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]+)?(Z|[+-][0-9]{2}:[0-9]{2})?$" + "pattern": "^(((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]*[1-9])?(Z|(-((0[0-9]|1[0-2]):00|0[39]:30)|\\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))?$" }, "DateTimeWithTimezoneDatatype": { "type": "string", "format": "date-time", - "pattern": "^(((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]+)?(Z|[+-][0-9]{2}:[0-9]{2})$" + "pattern": "^(((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]*[1-9])?(Z|(-((0[0-9]|1[0-2]):00|0[39]:30)|\\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))$" }, "DayTimeDurationDatatype": { "type": "string", diff --git a/schema/xml/metaschema-datatypes.xsd b/schema/xml/metaschema-datatypes.xsd index a1f8e099a..59a52e627 100644 --- a/schema/xml/metaschema-datatypes.xsd +++ b/schema/xml/metaschema-datatypes.xsd @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ The xs:dateTime with a required timezone. - +