All notable changes to period
will be documented in this file
- Refactor tests to pest by @AyoobMH in #115
- Add PHP 8.2 support by @patinthehat in #118
- Add Dependabot Automation by @patinthehat in #117
- Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in #119
- Implement PeriodCollection Union by @EriBloo in #116
- @AyoobMH made their first contribution in #115
- @dependabot made their first contribution in #119
- @EriBloo made their first contribution in #116
Full Changelog: https://github.com/spatie/period/compare/2.3.5...2.4.0
Revert previous release
Full Changelog: https://github.com/spatie/period/compare/2.3.3...2.3.4
Full Changelog: https://github.com/spatie/period/compare/2.3.2...2.3.3
- Error "Undefined array key 0" fix by @aliowacom in #105
- @aliowacom made their first contribution in #105
Full Changelog: https://github.com/spatie/period/compare/2.3.1...2.3.2
- @patinthehat made their first contribution in #102
- @kyryl-bogach made their first contribution in #103
Full Changelog: https://github.com/spatie/period/compare/2.3.0...2.3.1
- Add
PeriodCollection::sort()
(#97)
- Add
PeriodCollection::unique()
(#96)
- Don't initialize Period::asString in constructor
- Fix subtraction of empty PeriodCollection
- Reindex collection array after filtering values (#87)
- Add
PeriodCollection::subtract(PeriodCollection|Period $others)
(#84) - Rename parameter
PeriodCollection::overlap(PeriodCollection $others)
- Rename parameter
PeriodCollection::overlapAll(PeriodCollection ...$others)
- 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
orPeriodCollection
- Return types of several methods have been changed from
Period
tostatic
Period::duration()
returns an instance ofPeriodDuration
Period::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 bothDateTimeInterface
andPeriod
PeriodCollection::overlap()
now accepts one or several periods- Renamed all getters like
getIncludedEnd()
andgetStart()
toincludedEnd()
andstart()
, etc. - Add
Period::fromString()
- Add
Period::asString()
- Add
Period::renew
(#74)
- PHP8 compatibility
- Keep timezone when boundaries are timezoned (#71)
- Support multiple precisions when checking touchesWith (#68)
- Add
filter
toPeriodCollection
- Fix for PeriodCollection::gaps() with excluded boundaries (#58)
Performance improvement inedit: this change wasn't merged and targeted at 2.0Period::contains()
(#46)
Improve iterator performance (#42)edit: this change wasn't merged and targeted at 2.0
- Allow extension of Period that forces extension of DateTimeImmutable (#38)
- Support PeriodCollection::make()
- Improved PeriodCollection doc blocks
- Add
map
andreduce
toPeriodCollection
- 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
- Add
Period::contains
- Initial dev release