NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1729 most downloaded on Packagist
Complex period comparisons
Last release 4 years ago
no release in 18 months
Release timing varies
gaps range from 9 days to 7 months
Nearly every release is documented
notes for 41 of 43 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
43 releases · first in 2018
Refactor tests to pest by @AyoobMH in #115
Full Changelog: 2.3.5...2.4.0
One column per quarter.
Full Changelog: https://github.com/spatie/period/compare/2.3.5...2.4.0
Revert previous release
Revert previous release
Full Changelog : 2.3.3...2.3.4
Full Changelog: 2.3.3...2.3.4
Full Changelog : 2.3.2...2.3.3
Full Changelog: 2.3.2...2.3.3
Full Changelog: https://github.com/spatie/period/compare/2.3.2...2.3.3
Error "Undefined array key 0" fix by @aliowacom in #105
Full Changelog: 2.3.1...2.3.2
Add PHP 8.1 Support by @patinthehat in #102
Full Changelog: 2.3.0...2.3.1
Add PeriodCollection::sort()
PeriodCollection::sort() (#97)Add PeriodCollection::unique()
PeriodCollection::unique() (#96)Don't initialize Period::asString in constructor
Fix subtraction of empty PeriodCollection
Reindex collection array after filtering values
Add PeriodCollection::subtract(PeriodCollection|Period $others)
PeriodCollection::subtract(PeriodCollection|Period $others) (#84)PeriodCollection::overlap(PeriodCollection $others)PeriodCollection::overlapAll(PeriodCollection ...$others)Bump required PHP version to ^8.0
^8.0overlapAll when no overlapPeriod or PeriodCollectionPeriod to staticPeriod::duration() returns an instance of PeriodDurationPeriod::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 PeriodPeriodCollection::overlap() now accepts one or several periodsgetIncludedEnd() and getStart() to includedEnd() and start(), etc.Period::fromString()Period::asString()Support PHP 8.1 Full Changelog : 1.6.0...1.6.1
Full Changelog: 1.6.0...1.6.1
- Add Period::renew
Period::renew (#74)- PHP8 compatibility
Keep timezone when boundaries are timezoned
Support multiple precisions when checking touchesWith
- Add filter to PeriodCollection
filter to PeriodCollectionFix for PeriodCollection::gaps() with excluded boundaries
~Performance improvement in Period::contains() (#46)~ edit: this change wasn't merged and targeted at 2.0
Period::contains() (#46)~ edit: this change wasn't merged and targeted at 2.0~Improve iterator performance (#42)~ edit: this change wasn't merged and targeted at 2.0
Allow extension of Period that forces extension of DateTimeImmutable
Support PeriodCollection::make()
Add map and reduce to PeriodCollection
map and reduce to PeriodCollection- Remove unused code
- Add period collection add
Add period collection intersect
Even better docblock support for static return types
Better docblock support for static return types
Fix bug with null element in diff
- Make Period iterable
- First stable release
Fix bug with precision not being correctly copied
Add boundary and precision support
No overlap returns empty collection
- Add visualizer
Support edge case for two period diffs
Add better return types to support inherited periods
Nothing published for this version
- Add Period::contains
Period::contains- Initial dev release
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →