|
1 | | -{ |
2 | | - "id": "date_between", |
3 | | - "summary": "Between comparison for dates and times", |
4 | | - "description": "By default, this process checks whether `x` is later than or equal to `min` and before or equal to `max`.\n\nIf `exclude_max` is set to `true` the upper bound is excluded so that the process checks whether `x` is later than or equal to `min` and before `max`.\n\nLower and upper bounds are not allowed to be swapped. So `min` MUST be before or equal to `max` or otherwise the process always returns `false`.", |
5 | | - "categories": [ |
6 | | - "comparison", |
7 | | - "date & time" |
8 | | - ], |
9 | | - "experimental": true, |
10 | | - "parameters": [ |
11 | | - { |
12 | | - "name": "x", |
13 | | - "description": "The value to check.", |
14 | | - "schema": [ |
15 | | - { |
16 | | - "type": "string", |
17 | | - "format": "date-time", |
18 | | - "subtype": "date-time", |
19 | | - "description": "Date and time with a time zone." |
20 | | - }, |
21 | | - { |
22 | | - "type": "string", |
23 | | - "format": "date", |
24 | | - "subtype": "date", |
25 | | - "description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0." |
26 | | - }, |
27 | | - { |
28 | | - "type": "string", |
29 | | - "subtype": "time", |
30 | | - "pattern": "^\\d{2}:\\d{2}:\\d{2}$", |
31 | | - "description": "Time only, formatted as HH:MM:SS. The time zone is UTC." |
32 | | - } |
33 | | - ] |
34 | | - }, |
35 | | - { |
36 | | - "name": "min", |
37 | | - "description": "Lower boundary (inclusive) to check against.", |
38 | | - "schema": [ |
39 | | - { |
40 | | - "type": "string", |
41 | | - "format": "date-time", |
42 | | - "subtype": "date-time", |
43 | | - "description": "Date and time with a time zone." |
44 | | - }, |
45 | | - { |
46 | | - "type": "string", |
47 | | - "format": "date", |
48 | | - "subtype": "date", |
49 | | - "description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0." |
50 | | - }, |
51 | | - { |
52 | | - "type": "string", |
53 | | - "subtype": "time", |
54 | | - "pattern": "^\\d{2}:\\d{2}:\\d{2}$", |
55 | | - "description": "Time only, formatted as HH:MM:SS. The time zone is UTC." |
56 | | - } |
57 | | - ] |
58 | | - }, |
59 | | - { |
60 | | - "name": "max", |
61 | | - "description": "Upper boundary (inclusive) to check against.", |
62 | | - "schema": [ |
63 | | - { |
64 | | - "type": "string", |
65 | | - "format": "date-time", |
66 | | - "subtype": "date-time", |
67 | | - "description": "Date and time with a time zone." |
68 | | - }, |
69 | | - { |
70 | | - "type": "string", |
71 | | - "format": "date", |
72 | | - "subtype": "date", |
73 | | - "description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0." |
74 | | - }, |
75 | | - { |
76 | | - "type": "string", |
77 | | - "subtype": "time", |
78 | | - "pattern": "^\\d{2}:\\d{2}:\\d{2}$", |
79 | | - "description": "Time only, formatted as HH:MM:SS. The time zone is UTC." |
80 | | - } |
81 | | - ] |
82 | | - }, |
83 | | - { |
84 | | - "name": "exclude_max", |
85 | | - "description": "Exclude the upper boundary `max` if set to `true`. Defaults to `false`.", |
86 | | - "schema": { |
87 | | - "type": "boolean" |
88 | | - }, |
89 | | - "default": false, |
90 | | - "optional": true |
91 | | - } |
92 | | - ], |
93 | | - "returns": { |
94 | | - "description": "`true` if `x` is between the specified bounds, otherwise `false`.", |
95 | | - "schema": { |
96 | | - "type": [ |
97 | | - "boolean", |
98 | | - "null" |
99 | | - ] |
100 | | - } |
101 | | - }, |
102 | | - "examples": [ |
103 | | - { |
104 | | - "arguments": { |
105 | | - "x": "2020-01-01", |
106 | | - "min": "2021-01-01", |
107 | | - "max": "2022-01-01" |
108 | | - }, |
109 | | - "returns": false |
110 | | - } |
111 | | - ] |
112 | | -} |
| 1 | +{ |
| 2 | + "id": "date_between", |
| 3 | + "summary": "Between comparison for dates and times", |
| 4 | + "description": "By default, this process checks whether `x` is later than or equal to `min` and before or equal to `max`.\n\nIf `exclude_max` is set to `true` the upper bound is excluded so that the process checks whether `x` is later than or equal to `min` and before `max`.\n\nLower and upper bounds are not allowed to be swapped. So `min` MUST be before or equal to `max` or otherwise the process always returns `false`.", |
| 5 | + "categories": [ |
| 6 | + "comparison", |
| 7 | + "date & time" |
| 8 | + ], |
| 9 | + "parameters": [ |
| 10 | + { |
| 11 | + "name": "x", |
| 12 | + "description": "The value to check.", |
| 13 | + "schema": [ |
| 14 | + { |
| 15 | + "type": "string", |
| 16 | + "format": "date-time", |
| 17 | + "subtype": "date-time", |
| 18 | + "description": "Date and time with a time zone." |
| 19 | + }, |
| 20 | + { |
| 21 | + "type": "string", |
| 22 | + "format": "date", |
| 23 | + "subtype": "date", |
| 24 | + "description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0." |
| 25 | + }, |
| 26 | + { |
| 27 | + "type": "string", |
| 28 | + "subtype": "time", |
| 29 | + "pattern": "^\\d{2}:\\d{2}:\\d{2}$", |
| 30 | + "description": "Time only, formatted as HH:MM:SS. The time zone is UTC." |
| 31 | + } |
| 32 | + ] |
| 33 | + }, |
| 34 | + { |
| 35 | + "name": "min", |
| 36 | + "description": "Lower boundary (inclusive) to check against.", |
| 37 | + "schema": [ |
| 38 | + { |
| 39 | + "type": "string", |
| 40 | + "format": "date-time", |
| 41 | + "subtype": "date-time", |
| 42 | + "description": "Date and time with a time zone." |
| 43 | + }, |
| 44 | + { |
| 45 | + "type": "string", |
| 46 | + "format": "date", |
| 47 | + "subtype": "date", |
| 48 | + "description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0." |
| 49 | + }, |
| 50 | + { |
| 51 | + "type": "string", |
| 52 | + "subtype": "time", |
| 53 | + "pattern": "^\\d{2}:\\d{2}:\\d{2}$", |
| 54 | + "description": "Time only, formatted as HH:MM:SS. The time zone is UTC." |
| 55 | + } |
| 56 | + ] |
| 57 | + }, |
| 58 | + { |
| 59 | + "name": "max", |
| 60 | + "description": "Upper boundary (inclusive) to check against.", |
| 61 | + "schema": [ |
| 62 | + { |
| 63 | + "type": "string", |
| 64 | + "format": "date-time", |
| 65 | + "subtype": "date-time", |
| 66 | + "description": "Date and time with a time zone." |
| 67 | + }, |
| 68 | + { |
| 69 | + "type": "string", |
| 70 | + "format": "date", |
| 71 | + "subtype": "date", |
| 72 | + "description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0." |
| 73 | + }, |
| 74 | + { |
| 75 | + "type": "string", |
| 76 | + "subtype": "time", |
| 77 | + "pattern": "^\\d{2}:\\d{2}:\\d{2}$", |
| 78 | + "description": "Time only, formatted as HH:MM:SS. The time zone is UTC." |
| 79 | + } |
| 80 | + ] |
| 81 | + }, |
| 82 | + { |
| 83 | + "name": "exclude_max", |
| 84 | + "description": "Exclude the upper boundary `max` if set to `true`. Defaults to `false`.", |
| 85 | + "schema": { |
| 86 | + "type": "boolean" |
| 87 | + }, |
| 88 | + "default": false, |
| 89 | + "optional": true |
| 90 | + } |
| 91 | + ], |
| 92 | + "returns": { |
| 93 | + "description": "`true` if `x` is between the specified bounds, otherwise `false`.", |
| 94 | + "schema": { |
| 95 | + "type": [ |
| 96 | + "boolean", |
| 97 | + "null" |
| 98 | + ] |
| 99 | + } |
| 100 | + }, |
| 101 | + "examples": [ |
| 102 | + { |
| 103 | + "arguments": { |
| 104 | + "x": "2020-01-01", |
| 105 | + "min": "2021-01-01", |
| 106 | + "max": "2022-01-01" |
| 107 | + }, |
| 108 | + "returns": false |
| 109 | + } |
| 110 | + ] |
| 111 | +} |
0 commit comments