Skip to content

Commit e0a1ba9

Browse files
authored
Define ISO 8601-1:2019 recurring interval schemas (#23)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent bd7eb53 commit e0a1ba9

36 files changed

+8826
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 8601-1:2019 Recurring Time Interval by Duration and End (Calendar Date, Basic Format)",
4+
"description": "A recurring time interval identified by its duration and end, using a duration followed by calendar date combined with complete local time of day in basic format [\"R\"][n][\"/\"][duration][\"/\"][YYYY][MM][DD][\"T\"][hh][mm][ss] (§5.6.3 a, §5.5.3.3 a)",
5+
"$comment": "The recurrence number [n] is optional (§5.6.1). When absent, the number of occurrences is unbounded. This schema does not validate leap years or time shifts (§5.5.3.4 b)",
6+
"examples": [
7+
"R12/P1Y2M15DT12H30M0S/19850412T232050",
8+
"R/P1Y/20001231T235959",
9+
"R0/PT5H30M/20230615T180000",
10+
"R9999/P2W/19850101T000000"
11+
],
12+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
13+
"x-links": [ "https://www.iso.org/standard/70907.html" ],
14+
"type": "string",
15+
"pattern": "^R([0-9]+)?/(?:P[0-9]+(?:\\.[0-9]+)?W|P[0-9]+(?:\\.[0-9]+)?Y|P[0-9]+Y[0-9]+(?:\\.[0-9]+)?M|P[0-9]+Y[0-9]+M[0-9]+(?:\\.[0-9]+)?D|P[0-9]+(?:\\.[0-9]+)?M|P[0-9]+M[0-9]+(?:\\.[0-9]+)?D|P[0-9]+(?:\\.[0-9]+)?D|PT[0-9]+(?:\\.[0-9]+)?H|PT[0-9]+H[0-9]+(?:\\.[0-9]+)?M|PT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|PT[0-9]+(?:\\.[0-9]+)?M|PT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|PT[0-9]+(?:\\.[0-9]+)?S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0-9]+)?H|P[0-9]+M[0-9]+DT[0-9]+H[0-9]+(?:\\.[0-9]+)?M|P[0-9]+M[0-9]+DT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+M[0-9]+DT[0-9]+(?:\\.[0-9]+)?M|P[0-9]+M[0-9]+DT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+M[0-9]+DT[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?H|P[0-9]+DT[0-9]+H[0-9]+(?:\\.[0-9]+)?M|P[0-9]+DT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?M|P[0-9]+DT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?S)/([0-9]{4}(0[13578]|1[02])(0[1-9]|[12][0-9]|3[01])|[0-9]{4}(0[469]|11)(0[1-9]|[12][0-9]|30)|[0-9]{4}02(0[1-9]|1[0-9]|2[0-9]))T([01][0-9]|2[0-3])[0-5][0-9]([0-5][0-9]|60)$"
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 8601-1:2019 Recurring Time Interval by Duration and End (Calendar Date, Extended Format)",
4+
"description": "A recurring time interval identified by its duration and end, using a duration followed by calendar date combined with complete local time of day in extended format [\"R\"][n][\"/\"][duration][\"/\"][YYYY][\"-\"][MM][\"-\"][DD][\"T\"][hh][\":\"[mm][\":\"[ss] (§5.6.3 b, §5.5.3.3 b)",
5+
"$comment": "The recurrence number [n] is optional (§5.6.1). When absent, the number of occurrences is unbounded. This schema does not validate leap years or time shifts (§5.5.3.4 b)",
6+
"examples": [
7+
"R12/P1Y2M15DT12H30M0S/1985-04-12T23:20:50",
8+
"R/P1Y/2000-12-31T23:59:59",
9+
"R0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]|[12][0-9]|30)|[0-9]{4}-02-(0[1-9]|1[0-9]|2[0-9]))T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)$"
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 8601-1:2019 Recurring Time Interval by Duration and End (Ordinal Date, Basic Format)",
4+
"description": "A recurring time interval identified by its duration and end, using a duration followed by ordinal date combined with complete local time of day in basic format [\"R\"][n][\"/\"][duration][\"/\"][YYYY][DDD][\"T\"][hh][mm][ss] (§5.6.3 a, §5.5.3.4 a, §5.5.3.3 a)",
5+
"$comment": "The recurrence number [n] is optional (§5.6.1). When absent, the number of occurrences is unbounded. Day 366 is accepted for any year, and leap year validation must be performed by the consumer. Time shifts (§5.5.3.4 b) are not supported",
6+
"examples": [
7+
"R12/P1Y2M15DT12H30M0S/1985102T232050",
8+
"R/P1Y/2000366T235959",
9+
"R0/PT5H30M/2023166T180000",
10+
"R9999/P2W/1985001T000000"
11+
],
12+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
13+
"x-links": [ "https://www.iso.org/standard/70907.html" ],
14+
"type": "string",
15+
"pattern": "^R([0-9]+)?/(?:P[0-9]+(?:\\.[0-9]+)?W|P[0-9]+(?:\\.[0-9]+)?Y|P[0-9]+Y[0-9]+(?:\\.[0-9]+)?M|P[0-9]+Y[0-9]+M[0-9]+(?:\\.[0-9]+)?D|P[0-9]+(?:\\.[0-9]+)?M|P[0-9]+M[0-9]+(?:\\.[0-9]+)?D|P[0-9]+(?:\\.[0-9]+)?D|PT[0-9]+(?:\\.[0-9]+)?H|PT[0-9]+H[0-9]+(?:\\.[0-9]+)?M|PT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|PT[0-9]+(?:\\.[0-9]+)?M|PT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|PT[0-9]+(?:\\.[0-9]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\\.[0-9]+)?H|P[0-9]+M[0-9]+DT[0-9]+H[0-9]+(?:\\.[0-9]+)?M|P[0-9]+M[0-9]+DT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+M[0-9]+DT[0-9]+(?:\\.[0-9]+)?M|P[0-9]+M[0-9]+DT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+M[0-9]+DT[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?H|P[0-9]+DT[0-9]+H[0-9]+(?:\\.[0-9]+)?M|P[0-9]+DT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?M|P[0-9]+DT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?S)/[0-9]{4}(00[1-9]|0[1-9][0-9]|[12][0-9]{2}|3[0-5][0-9]|36[0-6])T([01][0-9]|2[0-3])[0-5][0-9]([0-5][0-9]|60)$"
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 8601-1:2019 Recurring Time Interval by Duration and End (Ordinal Date, Extended Format)",
4+
"description": "A recurring time interval identified by its duration and end, using a duration followed by ordinal date combined with complete local time of day in extended format [\"R\"][n][\"/\"][duration][\"/\"][YYYY][\"-\"][DDD][\"T\"][hh][\":\"[mm][\":\"[ss] (§5.6.3 b, §5.5.3.4 a, §5.5.3.3 b)",
5+
"$comment": "The recurrence number [n] is optional (§5.6.1). When absent, the number of occurrences is unbounded. Day 366 is accepted for any year, and leap year validation must be performed by the consumer. Time shifts (§5.5.3.4 b) are not supported",
6+
"examples": [
7+
"R12/P1Y2M15DT12H30M0S/1985-102T23:20:50",
8+
"R/P1Y/2000-366T23:59:59",
9+
"R0/PT5H30M/2023-166T18:00:00",
10+
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)$"
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 8601-1:2019 Recurring Time Interval by Duration and End (Week Date, Basic Format)",
4+
"description": "A recurring time interval identified by its duration and end, using a duration followed by week date combined with complete local time of day in basic format [\"R\"][n][\"/\"][duration][\"/\"][YYYY][\"W\"][ww][D][\"T\"][hh][mm][ss] (§5.6.3 a, §5.5.3.4 a, §5.5.3.3 a)",
5+
"$comment": "The recurrence number [n] is optional (§5.6.1). When absent, the number of occurrences is unbounded. Week 53 is accepted for any year, and validation of whether a year actually has 53 weeks must be performed by the consumer. Time shifts (§5.5.3.4 b) are not supported",
6+
"examples": [
7+
"R12/P1Y2M15DT12H30M0S/1985W155T232050",
8+
"R/P1Y/2000W527T235959",
9+
"R0/PT5H30M/2023W241T180000",
10+
"R9999/P2W/1985W011T000000"
11+
],
12+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
13+
"x-links": [ "https://www.iso.org/standard/70907.html" ],
14+
"type": "string",
15+
"pattern": "^R([0-9]+)?/(?:P[0-9]+(?:\\.[0-9]+)?W|P[0-9]+(?:\\.[0-9]+)?Y|P[0-9]+Y[0-9]+(?:\\.[0-9]+)?M|P[0-9]+Y[0-9]+M[0-9]+(?:\\.[0-9]+)?D|P[0-9]+(?:\\.[0-9]+)?M|P[0-9]+M[0-9]+(?:\\.[0-9]+)?D|P[0-9]+(?:\\.[0-9]+)?D|PT[0-9]+(?:\\.[0-9]+)?H|PT[0-9]+H[0-9]+(?:\\.[0-9]+)?M|PT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|PT[0-9]+(?:\\.[0-9]+)?M|PT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|PT[0-9]+(?:\\.[0-9]+)?S|P[0-9]+YT[0-9]+(?:\\.[0-9]+)?H|P[0-9]+YT[0-9]+H[0-9]+(?:\\.[0-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0-9]+DT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+M[0-9]+DT[0-9]+(?:\\.[0-9]+)?M|P[0-9]+M[0-9]+DT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+M[0-9]+DT[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?H|P[0-9]+DT[0-9]+H[0-9]+(?:\\.[0-9]+)?M|P[0-9]+DT[0-9]+H[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?M|P[0-9]+DT[0-9]+M[0-9]+(?:\\.[0-9]+)?S|P[0-9]+DT[0-9]+(?:\\.[0-9]+)?S)/[0-9]{4}W(0[1-9]|[1-4][0-9]|5[0-3])[1-7]T([01][0-9]|2[0-3])[0-5][0-9]([0-5][0-9]|60)$"
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 8601-1:2019 Recurring Time Interval by Duration and End (Week Date, Extended Format)",
4+
"description": "A recurring time interval identified by its duration and end, using a duration followed by week date combined with complete local time of day in extended format [\"R\"][n][\"/\"][duration][\"/\"][YYYY][\"-\"][\"W\"][ww][\"-\"][D][\"T\"][hh][\":\"[mm][\":\"[ss] (§5.6.3 b, §5.5.3.4 a, §5.5.3.3 b)",
5+
"$comment": "The recurrence number [n] is optional (§5.6.1). When absent, the number of occurrences is unbounded. Week 53 is accepted for any year, and validation of whether a year actually has 53 weeks must be performed by the consumer. Time shifts (§5.5.3.4 b) are not supported",
6+
"examples": [
7+
"R12/P1Y2M15DT12H30M0S/1985-W15-5T23:20:50",
8+
"R/P1Y/2000-W52-7T23:59:59",
9+
"R0/PT5H30M/2023-W24-1T18:00:00",
10+
"R9999/P2W/1985-W01-1T00:00:00"
11+
],
12+
"x-license": "https://github.com/sourcemeta/std/blob/main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