Complex period comparisons
PeriodCollection::subtract(PeriodCollection|Period $others)
(#84)PeriodCollection::overlap(PeriodCollection $others)
PeriodCollection::overlapAll(PeriodCollection ...$others)
^8.0
overlapAll
when no overlapPeriod
or PeriodCollection
Period
to static
Period::duration()
returns an instance of PeriodDuration
Period::length()
now uses the Period's precision instead of always returning daysPeriod::overlap()
renamed to Period::overlapAny()
Period::overlapSingle()
renamed to Period::overlap()
Period::diff()
renamed to Period::subtract()
Period::subtract()
(previously diff
) no longer returns the gap when there's no overlapPeriod::diffSingle()
renamed to Period::diffSymmetric()
Period::contains()
now accepts both DateTimeInterface
and Period
PeriodCollection::overlap()
now accepts one or several periodsgetIncludedEnd()
and getStart()
to includedEnd()
and start()
, etc.Period::fromString()
Period::asString()
Period::renew
(#74)Add filter to PeriodCollection