Make inclusive/exclusive ranges consistent and explicit #61
zanebclark
started this conversation in
Data Specification
Replies: 1 comment 10 replies
-
Big 👍 for explicitly defining inclusivity, and inclusive start/exclusive end is a good default. In MDS we went through a similar discussion and ended up choosing to add flags that allow policy authors to choose whether start and end are inclusive or exclusive, defaulting to inclusive. There were cases where folks thought one situation or the other made for the simplest policy rules. Here's the PR where we made the change: openmobilityfoundation/mobility-data-specification#689 |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Range inclusivity/exclusivity is suggested in the curbs spec. I'd recommend that range boundaries be explicitly defined as inclusive or exclusive. To aid in the sensible definition of contiguous ranges, I'd suggested that one range boundary is exclusive and one is inclusive. For example, defining two contiguous Time Spans with inclusive
from
and inclusiveto
would be a bit cumbersome:Note the need to define the 2nd Time Span with a contrived
from
. Having an inclusivefrom
and exclusiveto
would solve this.A few ranges with the my interpreted range boundary conditions:
start_date
: Inclusiveend_date
: Exclusivefrom
: Inclusiveto
: Inclusivestart_minutes
: Inclusiveend_minutes
: Inclusivestart
: Inclusiveend
: InclusiveBeta Was this translation helpful? Give feedback.
All reactions