Skip to content

Releases: thephpleague/period

version 4.2.0

19 Dec 13:04
Compare
Choose a tag to compare

Added

  • League\Period\Datepoint
  • League\Period\Duration
  • Period::fromIsoYear
  • Period::fromYear
  • Period::fromSemester
  • Period::fromQuarter
  • Period::fromMonth
  • Period::fromIsoWeek
  • Period::fromDay
  • Period::after
  • Period::before
  • Period::around
  • Period::fromDatePeriod
  • Sequence::map

Fixed

  • None

Deprecated

  • League\Period\datepoint
  • League\Period\duration
  • League\Period\year
  • League\Period\semester
  • League\Period\quarter
  • League\Period\month
  • League\Period\day
  • League\Period\hour
  • League\Period\minute
  • League\Period\second
  • League\Period\instant
  • League\Period\iso_year
  • League\Period\iso_week
  • League\Period\interval_after
  • League\Period\interval_before
  • League\Period\interval_around
  • League\Period\interval_from_dateperiod

Removed

  • None

version 4.1.0

07 Dec 09:07
Compare
Choose a tag to compare

Added

  • League\Period\Sequence
  • League\Period\InvalidIndex

Fixed

  • None

Deprecated

  • None

Removed

  • None

version 4.0.1

30 Nov 11:55
Compare
Choose a tag to compare

Added

  • None

Fixed

  • Period::split does not work with daylight saving see issue #68

Deprecated

  • None

Removed

  • None

version 4.0.0

18 Oct 09:50
Compare
Choose a tag to compare

Added

Classes

  • Exception class

Methods

  • Period::durationCompare
  • Period::durationEquals
  • Period::format
  • Period::expand
  • Period::equals
  • Period::getDatePeriodBackwards

Functions

  • League\Period\datepoint
  • League\Period\duration
  • League\Period\year
  • League\Period\semester
  • League\Period\quarter
  • League\Period\month
  • League\Period\day
  • League\Period\hour
  • League\Period\minute
  • League\Period\second
  • League\Period\instant
  • League\Period\iso_year
  • League\Period\iso_week
  • League\Period\interval_after
  • League\Period\interval_before
  • League\Period\interval_around
  • League\Period\interval_from_dateperiod

Fixed

  • The Period class is now final
  • Period::JsonSerialize now returns datepoint in JavaScript compatible notation
  • Period::diff always returns an array containing two values.
  • An instance with a duration equals to DateInterval('PT0S') will contains no datepoint not even its starting datepoint.

Deprecated

  • None

Removed

  • Support for PHP 7.0
  • Period::next
  • Period::previous
  • Period::add
  • Period::sub
  • Period::createFromYear replaced by League\Period\year
  • Period::createFromMonth replaced by League\Period\month
  • Period::createFromWeek replaced by League\Period\iso_week
  • Period::createFromDay replaced by League\Period\day
  • Period::createFromSemester replaced by League\Period\semester
  • Period::createFromQuarter replaced by League\Period\quarter
  • Period::createFromDuration replaced by League\Period\interval_after
  • Period::createFromDurationBeforeEnd replaced by League\Period\interval_before
  • Period::sameValueAs replaced by Period::equals
  • Period::sameDurationAs replaced by Period::durationEquals
  • Period::compareDuration replaced by Period::durationCompare
  • Period::withDuration replaced by Period::withDurationAfterStart

version 3.4.0

17 Nov 11:35
Compare
Choose a tag to compare

Added

  • Period::withDurationBeforeEnd
  • Period::splitBackwards

Fixed

  • None

Deprecated

  • None

Removed

  • dropped support for HHVM

version 3.3.0

19 Sep 10:41
Compare
Choose a tag to compare

Added

Fixed

  • None

Deprecated

Removed

  • None

version 3.2.0

09 May 11:05
Compare
Choose a tag to compare

Added

  • Period::__set_state
  • autoloader to use the library without composer

Fixed

Deprecated

  • None

Removed

  • None

version 3.1.1

12 Feb 11:38
Compare
Choose a tag to compare

Added

  • None

Fixed

  • Period::contains see issue #31
  • microseconds are taken into account when converting DateTimeInterface objects.

Deprecated

  • None

Removed

  • None

version 3.1.0

01 Feb 11:52
Compare
Choose a tag to compare

Added

  • Period::createFromDay

Fixed

  • Period::getDatePeriod adding the $option parameter
  • DateTime to DateTimeImmutable convertion improved for PHP 5.6+ version
  • Bumped version requirement to PHP 5.5.9 because of a bug in DatePeriod constructor

Deprecated

  • None

Removed

  • None

version 3.0.1

22 Dec 10:58
Compare
Choose a tag to compare

Added

  • None

Fixed

Deprecated

  • None

Removed

  • None