forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 4
/
date_between.json
112 lines (112 loc) · 4.08 KB
/
date_between.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{
"id": "date_between",
"summary": "Between comparison for dates and times",
"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`.",
"categories": [
"comparison",
"date & time"
],
"experimental": true,
"parameters": [
{
"name": "x",
"description": "The value to check.",
"schema": [
{
"type": "string",
"format": "date-time",
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "string",
"subtype": "time",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"description": "Time only, formatted as HH:MM:SS. The time zone is UTC."
}
]
},
{
"name": "min",
"description": "Lower boundary (inclusive) to check against.",
"schema": [
{
"type": "string",
"format": "date-time",
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "string",
"subtype": "time",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"description": "Time only, formatted as HH:MM:SS. The time zone is UTC."
}
]
},
{
"name": "max",
"description": "Upper boundary (inclusive) to check against.",
"schema": [
{
"type": "string",
"format": "date-time",
"subtype": "date-time",
"description": "Date and time with a time zone."
},
{
"type": "string",
"format": "date",
"subtype": "date",
"description": "Date only, formatted as `YYYY-MM-DD`. The time zone is UTC. Missing time components are all 0."
},
{
"type": "string",
"subtype": "time",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"description": "Time only, formatted as HH:MM:SS. The time zone is UTC."
}
]
},
{
"name": "exclude_max",
"description": "Exclude the upper boundary `max` if set to `true`. Defaults to `false`.",
"schema": {
"type": "boolean"
},
"default": false,
"optional": true
}
],
"returns": {
"description": "`true` if `x` is between the specified bounds, otherwise `false`.",
"schema": {
"type": [
"boolean",
"null"
]
}
},
"examples": [
{
"arguments": {
"x": "2020-01-01",
"min": "2021-01-01",
"max": "2022-01-01"
},
"returns": false
}
]
}