Period Versions Save

Complex period comparisons

2.1.2

2 years ago
  • Fix subtraction of empty PeriodCollection

2.1.1

2 years ago
  • reindex collection array after filtering values (#87)

2.1.0

3 years ago
  • Add PeriodCollection::subtract(PeriodCollection|Period $others) (#84)
  • Rename parameter PeriodCollection::overlap(PeriodCollection $others)
  • Rename parameter PeriodCollection::overlapAll(PeriodCollection ...$others)

2.0.0

3 years ago
  • 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

3 years ago
  • Add Period::renew (#74)

1.5.3

3 years ago
  • PHP8 compatibility

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

4 years ago

Add filter to PeriodCollection

1.4.5

4 years ago