spatie/period
Complex period comparisons
30 Releases
Latest: 3y ago
2.4.0Latest
📋 What's Changed
- Refactor tests to pest by @AyoobMH in https://github.com/spatie/period/pull/115
- Add PHP 8.2 support by @patinthehat in https://github.com/spatie/period/pull/118
- Add Dependabot Automation by @patinthehat in https://github.com/spatie/period/pull/117
- Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/spatie/period/pull/119
- Implement PeriodCollection Union by @EriBloo in https://github.com/spatie/period/pull/116
✨ New Contributors
- @AyoobMH made their first contribution in https://github.com/spatie/period/pull/115
- @dependabot made their first contribution in https://github.com/spatie/period/pull/119
- @EriBloo made their first contribution in https://github.com/spatie/period/pull/116
- Full Changelog: https://github.com/spatie/period/compare/2.3.5...2.4.0
2.3.5
Revert previous release
2.3.4
**Full Changelog**: https://github.com/spatie/period/compare/2.3.3...2.3.4
2.3.3
**Full Changelog**: https://github.com/spatie/period/compare/2.3.2...2.3.3
2.3.2
📋 What's Changed
- Error "Undefined array key 0" fix by @aliowacom in https://github.com/spatie/period/pull/105
✨ New Contributors
- @aliowacom made their first contribution in https://github.com/spatie/period/pull/105
- Full Changelog: https://github.com/spatie/period/compare/2.3.1...2.3.2
1.6.1
📋 Changes
- Support PHP 8.1
2.3.1
📋 What's Changed
- Add PHP 8.1 Support by @patinthehat in https://github.com/spatie/period/pull/102
- Improve PHP 8.1.0 support by @kyryl-bogach in https://github.com/spatie/period/pull/103
✨ New Contributors
- @patinthehat made their first contribution in https://github.com/spatie/period/pull/102
- @kyryl-bogach made their first contribution in https://github.com/spatie/period/pull/103
- Full Changelog: https://github.com/spatie/period/compare/2.3.0...2.3.1
2.3.0
📋 Changes
- Add `PeriodCollection::sort()` (#97)
2.2.0
📋 Changes
- Add `PeriodCollection::unique()` (#96)
2.1.3
📋 Changes
- Don't initialize Period::asString in constructor
2.1.2
📋 Changes
- Fix subtraction of empty PeriodCollection
2.1.1
📋 Changes
- reindex collection array after filtering values (#87)
2.1.0
📋 Changes
- Add `PeriodCollection::subtract(PeriodCollection|Period $others)` (#84)
- Rename parameter `PeriodCollection::overlap(PeriodCollection $others)`
- Rename parameter `PeriodCollection::overlapAll(PeriodCollection ...$others)`
2.0.0
📋 Changes
- Bump required PHP version to `^8.0`
- Fix bug with `overlapAll` when no overlap
- All period properties are now typed, this affects you if you extend from `Period` or `PeriodCollection`
- Return types of several methods have been changed from `Period` to `static`
- `Period::duration()` returns an instance of `PeriodDuration`
- `Period::length()` now uses the Period's precision instead of always returning days
- `Period::overlap()` renamed to `Period::overlapAny()`
- `Period::overlapSingle()` renamed to `Period::overlap()`
- + 8 more
1.6.0
📋 Changes
- Add `Period::renew` (#74)
1.5.3
📋 Changes
- PHP8 compatibility
1.5.2
1.5.1
1.5.0
Add filter to PeriodCollection
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.1
1.3.0
1.2.0
1.1.3
1.1.2
📋 Changes
- Better docblock support for static return types
