date-time
date-time copied to clipboard
`Interval` is so barebones compared to `LocalDateRange`
I suggest Interval should have the following methods, like in LocalDateRange:
-
contains(Instant): bool -
intersectsWith(Interval): bool -
getIntersectionWith(Interval): Interval -
of(Instant, Instant): self- for consistency with other classes
and nice to haves (also contained in the LocalDateRange):
-
isEqualTo(Interval): bool -
toNativeDatePeriod(): \DatePeriod