spatie/period
Complex period comparisons
2.4.0
4.8M downloads/mo
#1862 most downloaded on Packagist
spatie/period
What this package is like to depend on
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
0 releases in the last 12 months
see the full history below
Release timeline
42 releases · Nov 2018 to Feb 2023Releases
latest 43-
2.4.020 Feb 2023Release notes
Open source →What's Changed
- 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
New Contributors
- @AyoobMH made their first contribution in #115
- @dependabot made their first contribution in #119
- @EriBloo made their first contribution in #116
Full Changelog: 2.3.5...2.4.0
Release notes
Open source →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.503 Oct 2022 -
2.3.403 Oct 2022 -
2.3.303 Mar 2022 -
2.3.223 Dec 2021Release notes
Open source →What's Changed
- Error "Undefined array key 0" fix by @aliowacom in #105
New Contributors
- @aliowacom made their first contribution in #105
Full Changelog: 2.3.1...2.3.2
-
2.3.101 Dec 2021Release notes
Open source →What's Changed
- Add PHP 8.1 Support by @patinthehat in #102
- Improve PHP 8.1.0 support by @kyryl-bogach in #103
New Contributors
- @patinthehat made their first contribution in #102
- @kyryl-bogach made their first contribution in #103
Full Changelog: 2.3.0...2.3.1
-
2.3.014 Oct 2021 -
2.2.013 Oct 2021 -
2.1.307 Oct 2021 -
2.1.207 Oct 2021 -
2.1.111 Jun 2021 -
2.1.024 Mar 2021Release notes
Open source →- Add
PeriodCollection::subtract(PeriodCollection|Period $others)(#84) - Rename parameter
PeriodCollection::overlap(PeriodCollection $others) - Rename parameter
PeriodCollection::overlapAll(PeriodCollection ...$others)
- Add
-
2.0.017 Mar 2021Release notes
Open source →- 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()
- Bump required PHP version to
-
1.6.113 Dec 2021 -
1.6.024 Feb 2021 -
1.5.303 Dec 2020 -
1.5.219 Nov 2020 -
1.5.121 Oct 2020 -
1.5.031 Mar 2020 -
1.4.505 Feb 2020 -
1.4.405 Aug 2019Release notes
Open source →- ~Performance improvement in
Period::contains()(#46)~ edit: this change wasn't merged and targeted at 2.0
- ~Performance improvement in
-
1.4.309 Jul 2019Release notes
Open source →- ~Improve iterator performance (#42)~ edit: this change wasn't merged and targeted at 2.0
-
1.4.227 May 2019Release notes
Open source →- Allow extension of Period that forces extension of DateTimeImmutable (#38)
-
1.4.123 Apr 2019 -
1.4.023 Apr 2019 -
1.3.119 Apr 2019 -
1.3.019 Apr 2019 -
1.2.019 Apr 2019 -
1.1.305 Apr 2019 -
1.1.205 Apr 2019 -
1.1.101 Feb 2019 -
1.1.026 Jan 2019 -
1.0.017 Jan 2019 -
0.5.114 Jan 2019 -
0.5.009 Jan 2019 -
0.4.108 Jan 2019 -
0.4.019 Dec 2018 -
0.3.318 Dec 2018 -
0.3.211 Dec 2018 -
0.3.130 Nov 2018Nothing published for this version
-
0.3.0no date -
0.2.029 Nov 2018 -
0.1.027 Nov 2018Nothing published for this version