Skip to content

Releases: thephpleague/period

version 3.0.0

02 Sep 10:47
Compare
Choose a tag to compare

Added

  • Period implements the JsonSerializable interface
  • Period can now be extended

Fixed

  • Period always returns DateTimeImmutable objects
  • Period::split returns a Generator
  • Period::merge no longer throws RuntimeException

Deprecated

  • None

Removed

  • support for PHP 5.4
  • Period::getStart
  • Period::getEnd
  • Period::getRange
  • Period::duration
  • Period::durationDiff

version 2.5.1

06 Mar 13:34
Compare
Choose a tag to compare

Fixed

  • Period always returns DateTime objects even when given DateTimeImmutable objects.

version 2.5.0

06 Mar 09:41
Compare
Choose a tag to compare

Added

  • Period::split to split a Period object into smaller Period objects #16

Fixed

  • DateInterval validation when created from an integer.

Remove

  • support for PHP 5.3

Please refers to the documentation or the library CHANGELOG for more details

version 2.4.0

18 Dec 08:44
Compare
Choose a tag to compare
  • Added Period::diff
  • Added support for the DateTimeInterface

Please refers to the documentation or the library CHANGELOG for more details

version 2.3.0

15 Dec 13:00
Compare
Choose a tag to compare
  • Added : Period::createFromDurationBeforeEnd
  • Bug Fixed : Period::isBefore and Period::isAfter
  • Internal code improved

Please refers to the documentation or the library CHANGELOG for more details

version 2.2.0

12 Dec 14:43
Compare
Choose a tag to compare

Added new methods

  • Period::gap
  • Period::abuts
  • Period::isAfter
  • Period::isBefore

Fixed methods

  • Period::overlaps bug from issue #8

Please refers to the documentation or the library CHANGELOG for more details

version 2.1.0

08 Dec 07:53
Compare
Choose a tag to compare

Added

  • Modifying methods:
    • Period::next
    • Period::previous
  • Period::__toString using ISO8601 representation

version 2.0.0

15 Oct 13:53
Compare
Choose a tag to compare

Added

  • Change vendor namespace from Period to League\Period
  • Comparing methods:
    • Period::sameValueAs,
    • Period::compareDuration,
    • Period::durationGreaterThan,
    • Period::durationLessThan,
    • Period::sameDurationAs,
    • Period::durationDiff
  • Modifying methods:
    • Period::add,
    • Period::sub,
    • Period::intersect

Fixed

  • Period::contains now works with Period objects
  • Period::getDuration accept an optional parameter $get_as_seconds if used and set to true, the method will return a integer which represents the duration in seconds.
  • Period::merge now accepts one or more Period objects to return the Period object which contains all submitted Period objects.

version 1.0.1

08 Oct 08:07
Compare
Choose a tag to compare
  • The $interval parameter can also be an integer interpreted as the number of seconds after which the period must be considered finished.

version 1.0.0

24 Sep 07:40
Compare
Choose a tag to compare

First stable release