Releases: spatie/period
Releases · spatie/period
2.1.2
2.1.1
2.1.0
2.0.0
- Bump required PHP version to
^8.0 - Fix bug with
overlapAllwhen no overlap - All period properties are now typed, this affects you if you extend from
PeriodorPeriodCollection - Return types of several methods have been changed from
Periodtostatic Period::duration()returns an instance ofPeriodDurationPeriod::length()now uses the Period's precision instead of always returning daysPeriod::overlap()renamed toPeriod::overlapAny()Period::overlapSingle()renamed toPeriod::overlap()Period::diff()renamed toPeriod::subtract()Period::subtract()(previouslydiff) no longer returns the gap when there's no overlapPeriod::diffSingle()renamed toPeriod::diffSymmetric()Period::contains()now accepts bothDateTimeInterfaceandPeriodPeriodCollection::overlap()now accepts one or several periods- Renamed all getters like
getIncludedEnd()andgetStart()toincludedEnd()andstart(), etc. - Add
Period::fromString() - Add
Period::asString()
1.6.0
1.5.3
- PHP8 compatibility
1.5.2
1.5.1
1.5.0
Add filter to PeriodCollection