Skip to content

Releases: thephpleague/period

version 4.9.0

02 Sep 06:38
Compare
Choose a tag to compare

Added

  • $boundaryType argument added to the following named constructors:

    • Period::fromDay
    • Period::fromIsoWeek
    • Period::fromMonth
    • Period::fromQuarter
    • Period::fromSemester
    • Period::fromYear
    • Period::fromIsoYear
  • Period::subtract

  • Sequence::subtract

Fixed

  • None

Deprecated

  • Period::substract use Period::subtract instead
  • Sequence::substract use Sequence::subtract instead

Removed

  • None

version 4.8.1

16 Jul 10:16
Compare
Choose a tag to compare

Added

  • None

Fixed

  • Sequence negative offsets for a object with only one Period instance issue #85

Deprecated

  • None

Removed

  • None

version 4.8.0

20 Jun 20:56
Compare
Choose a tag to compare

Added

  • Datepoint methods returning Period objects supports boundaryType
  • Period::merge supports empty arguments.
  • Sequence::contains supports empty arguments.
  • Sequence::unshift supports empty arguments.
  • Sequence::push supports empty arguments.
  • Sequence class supports negative offsets.

Fixed

  • Duration::adjustedTo no longer compares DateInterval objects to be compatible with PHP7.4+

Deprecated

  • None

Removed

  • None

version 4.7.1

19 May 08:17
Compare
Choose a tag to compare

Added

  • None

Fixed

Deprecated

  • None

Removed

  • None

version 4.7.0

31 Mar 05:58
Compare
Choose a tag to compare

Added

  • Sequence::getTotalTimestampInterval see PR #79
  • Period::substract see PR #80
  • Sequence::substract see PR #81

Fixed

Deprecated

  • None

Removed

  • None

version 4.6.0

06 Mar 14:42
Compare
Choose a tag to compare

Added

  • Duration::adjustedTo
  • Internals: added support for PHP7.4 and PHP8.0 in travis.yml

Fixed

  • None

Deprecated

  • Duration::withoutCarryOver use Duration::adjustedTo instead

Removed

  • None

version 4.5.0

03 Feb 09:21
Compare
Choose a tag to compare

Added

  • Datepoint::isBefore
  • Datepoint::bordersOnStart
  • Datepoint::isStarting
  • Datepoint::isDuring
  • Datepoint::isEnding
  • Datepoint::bordersOnEnd
  • Datepoint::isAfter
  • Datepoint::abuts
  • Duration::create now supports chronometer format
  • Duration::withoutCarryOver

Fixed

  • Period::durationCompare to take into account Timezone and DST

Deprecated

  • Duration::__toString use Duration::format instead

Removed

  • None

version 4.4.0

20 Jan 13:31
Compare
Choose a tag to compare

Added

  • Added support for the boundary type
    • Period::EXCLUDE_START_INCLUDE_END
    • Period::INCLUDE_START_EXCLUDE_END
    • Period::EXCLUDE_ALL
    • Period::INCLUDE_ALL
    • Period::getBoundaryType
    • Period::isStartExcluded
    • Period::isStartIncluded
    • Period::isEndExcluded
    • Period::isEndIncluded
    • Period::withBoundaryType
    • Period::__construct adds the $boundaryType argument;
    • Period::after adds the $boundaryType argument;
    • Period::before adds the $boundaryType argument;
    • Period::around adds the $boundaryType argument;
    • Period::fromDatePeriod adds the $boundaryType argument;
  • Added missing Allen's Algebra intervals
    • Period::bordersOnStart
    • Period::bordersOnEnd
    • Period::isDuring
    • Period::isStartedBy
    • Period::isEndedBy
  • Added additional methods to the Sequence class
    • Sequence::unions
    • Sequence::intersections
    • Sequence::gaps
    • Sequence::boundaries
    • Sequence::reduce

Fixed

  • None

Deprecated

  • Sequence::getIntersections use Sequence::intersections instead
  • Sequence::getGaps use Sequence::gaps instead
  • Sequence::getBoundaries use Sequence::boundaries instead

Removed

  • None

version 4.3.1

07 Jan 13:06
Compare
Choose a tag to compare

Added

  • None

Fixed

  • Datepoint::createFromFormat see issue #72

Deprecated

  • None

Removed

  • None

version 4.3.0

21 Dec 08:58
Compare
Choose a tag to compare

Added

  • Sequence implements the ArrayAccess interface

Fixed

  • Sequence::map must preserve offset index after modification.

Deprecated

  • None

Removed

  • None