date-time icon indicating copy to clipboard operation
date-time copied to clipboard

`Interval` is so barebones compared to `LocalDateRange`

Open someniatko opened this issue 3 years ago • 0 comments

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

someniatko avatar Aug 12 '22 07:08 someniatko