spatie / period

Complex period comparisons
https://spatie.be/open-source
MIT License
1.55k stars 72 forks source link

Check if Period overlaps any Period's within a PeriodCollection #98

Closed amirakbulut closed 2 years ago

amirakbulut commented 2 years ago

Is there a way to check if a single Period overlaps any other Period within a PeriodCollection, without having to manually loop over each collection item?

Sorry for asking this question as a issue, is there a discord chat or anything similar regarding this package?

brendt commented 2 years ago

How about creating an overlap, and checking without the resulting collection isn't empty? https://github.com/spatie/period#overlapallperiodcollection-others-periodcollection