Support for "Except" Policies #79
Replies: 3 comments 5 replies
-
Based on feedback from the 2/15 meeting, there is some overlap here with the concept of
A proposal:Include optional When adding a named {
"name": "MLK Jr. Day",
"category": "Holiday",
"days_of_week": [
"mon"
],
"days_of_month": [
15,
16,
17,
18,
19,
20,
21
],
"months": [
1
]
} {
"name": "Washington’s Birthday / President's Day",
"category": "Holiday",
"days_of_week": [
"mon"
],
"days_of_month": [
15,
16,
17,
18,
19,
20,
21
],
"months": [
2
]
} And the use of said {
"time_spans": [
{
"days_of_week": [
"mon",
"tue"
],
"time_of_day_start": "10:00",
"time_of_day_end": "13:00"
},
{
"name": "MLK Jr. Day",
"additive": false
},
{
"name": "Washington’s Birthday / President's Day",
"additive": false
}
]
} Or, we could "Except" an entire category: {
"time_spans": [
{
"days_of_week": [
"mon",
"tue"
],
"time_of_day_start": "10:00",
"time_of_day_end": "13:00"
},
{
"category": "Holiday",
"additive": false
}
]
} This proposal addresses the limitations of designated period outlined above:
{
"time_spans": [
{
"days_of_week": [
"mon",
"tue"
],
"time_of_day_start": "10:00",
"time_of_day_end": "13:00"
},
{
"name": "MLK Jr. Day",
"category": "Holiday",
"additive": false,
"days_of_week": [
"mon"
],
"days_of_month": [
15,
16,
17,
18,
19,
20,
21
],
"months": [
1
]
},
{
"name": "Washington’s Birthday / President's Day",
"category": "Holiday",
"additive": false,
"days_of_week": [
"mon"
],
"days_of_month": [
15,
16,
17,
18,
19,
20,
21
],
"months": [
2
]
}
]
} Named
|
Beta Was this translation helpful? Give feedback.
-
Points from WG meeting:
|
Beta Was this translation helpful? Give feedback.
-
@jacobmalleau, thanks for bringing up school days! That's a good get. |
Beta Was this translation helpful? Give feedback.
-
I saw a street sign with a policy followed by "except Holidays and Sundays". We could do the "except Sundays" part by defining a Time Span that specifies all of the
days_of_week
values except for Sunday. The "except Holidays" part is much harder without the ability to define "subtractive" or "negative" Time Spans.Policy
time_spans
starts out entirely negative (the policy doesn't apply) and Time Spans are positive (the policy does apply). If you could define a "negative" Time Span, you could reflect "except" policies by layering "negative" Time Spans on top of "positive" Time Spans. For example:In this example, I included two potential ways to express a time span that removes coverage: "additive": false and "positive": false. The default for these attributes would be "true".
Beta Was this translation helpful? Give feedback.
All reactions