@nyamsprod nyamsprod released this Oct 18, 2018 · 4 commits to master since this release

Assets 2

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

@nyamsprod nyamsprod released this Nov 17, 2017 · 145 commits to master since this release

Assets 2

Added

  • Period::withDurationBeforeEnd
  • Period::splitBackwards

Fixed

  • None

Deprecated

  • None

Removed

  • dropped support for HHVM

@nyamsprod nyamsprod released this Sep 19, 2016 · 164 commits to master since this release

Assets 2

Added

Fixed

  • None

Deprecated

Removed

  • None

@nyamsprod nyamsprod released this May 9, 2016 · 178 commits to master since this release

Assets 2

Added

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

Fixed

Deprecated

  • None

Removed

  • None

@nyamsprod nyamsprod released this Feb 12, 2016 · 188 commits to master since this release

Assets 2

Added

  • None

Fixed

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

Deprecated

  • None

Removed

  • None

@nyamsprod nyamsprod released this Feb 1, 2016 · 191 commits to master since this release

Assets 2

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

@nyamsprod nyamsprod released this Dec 22, 2015 · 199 commits to master since this release

Assets 2

Added

  • None

Fixed

Deprecated

  • None

Removed

  • None

@nyamsprod nyamsprod released this Sep 2, 2015 · 202 commits to master since this release

Assets 2

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

@nyamsprod nyamsprod released this Mar 6, 2015 · 255 commits to master since this release

Assets 2

Fixed

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

@nyamsprod nyamsprod released this Mar 6, 2015 · 256 commits to master since this release

Assets 2

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