Skip to content

Releases: spatie/period

2.1.2

07 Oct 03:46
Compare
Choose a tag to compare
  • Fix subtraction of empty PeriodCollection

2.1.1

11 Jun 18:08
e85d805
Compare
Choose a tag to compare
  • reindex collection array after filtering values (#87)

2.1.0

24 Mar 09:08
Compare
Choose a tag to compare
  • Add PeriodCollection::subtract(PeriodCollection|Period $others) (#84)
  • Rename parameter PeriodCollection::overlap(PeriodCollection $others)
  • Rename parameter PeriodCollection::overlapAll(PeriodCollection ...$others)

2.0.0

17 Mar 10:38
Compare
Choose a tag to compare
  • 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()
  • Period::diff() renamed to Period::subtract()
  • Period::subtract() (previously diff) no longer returns the gap when there's no overlap
  • Period::diffSingle() renamed to Period::diffSymmetric()
  • Period::contains() now accepts both DateTimeInterface and Period
  • PeriodCollection::overlap() now accepts one or several periods
  • Renamed all getters like getIncludedEnd() and getStart() to includedEnd() and start(), etc.
  • Add Period::fromString()
  • Add Period::asString()

1.6.0

24 Feb 14:52
Compare
Choose a tag to compare
  • Add Period::renew (#74)

1.5.3

03 Dec 14:44
577c10f
Compare
Choose a tag to compare
  • PHP8 compatibility

1.5.2

19 Nov 05:26
Compare
Choose a tag to compare
Update CHANGELOG

1.5.1

21 Oct 09:18
Compare
Choose a tag to compare
Update CHANGELOG

1.5.0

31 Mar 10:06
50395af
Compare
Choose a tag to compare

Add filter to PeriodCollection

1.4.5

05 Feb 13:51
Compare
Choose a tag to compare
Fix for PeriodCollection::gaps() with excluded boundaries (#58)