Method Calendar.TimeRanges.TimeRange()->contains()
- Method
strictly_preceeds
Method preceeds
Method is_previous_to
Method overlaps
Method contains
Method equals
Method is_next_to
Method succeeds
Method strictly_succeeds
boolstrictly_preceeds(TimeRangewhat)
boolpreceeds(TimeRangewhat)
boolis_previous_to(TimeRangewhat)
booloverlaps(TimeRangewhat)
boolcontains(TimeRangewhat)
boolequals(TimeRangewhat)
boolis_next_to(TimeRangewhat)
boolsucceeds(TimeRangewhat)
boolstrictly_succeeds(TimeRangewhat)- Description
-
These methods exists to compare two periods of time on the timeline.
case predicates <-- past future -> |----A----| A strictly preceeds B, |----B----| A preceeds B |----A----| A strictly preceeds B, A preceeds B, |----B----| A is previous to B, A touches B |----A----| A preceeds B, |----B----| A overlaps B, A touches B |-------A-------| A preceeds B, A ends with B |----B----| A overlaps B, A contains B, A touches B, |-------A-------| A preceeds B, A succeeds B, |---B---| A overlaps B, A contains B, A touches B |----A----| A overlaps B, A touches B, A contains B |----B----| A equals B, A starts with B, A ends with B |-------A-------| A succeeds B, A starts with B |----B----| A overlaps B, A contains B, A touches B |----A----| A succeeds B, |----B----| A overlaps B, A touches B |----A----| A strictly succeeds B, A succeeds B |----B----| A is next to B, A touches B |----A----| A strictly succeeds B, |----B----| A succeeds B - Note
-
These methods only check the range of the first to the last time in the period; use of combined time periods (SuperTimeRanges) might not give you the result you want.
- See also