Releases: thephpleague/period
Releases · thephpleague/period
version 3.0.0
Added
Period
implements theJsonSerializable
interfacePeriod
can now be extended
Fixed
Period
always returnsDateTimeImmutable
objectsPeriod::split
returns aGenerator
Period::merge
no longer throwsRuntimeException
Deprecated
- None
Removed
- support for PHP 5.4
Period::getStart
Period::getEnd
Period::getRange
Period::duration
Period::durationDiff
version 2.5.1
Fixed
Period
always returnsDateTime
objects even when givenDateTimeImmutable
objects.
version 2.5.0
Added
Period::split
to split aPeriod
object into smallerPeriod
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
- Added
Period::diff
- Added support for the
DateTimeInterface
Please refers to the documentation or the library CHANGELOG for more details
version 2.3.0
- Added :
Period::createFromDurationBeforeEnd
- Bug Fixed :
Period::isBefore
andPeriod::isAfter
- Internal code improved
Please refers to the documentation or the library CHANGELOG for more details
version 2.2.0
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
Added
- Modifying methods:
Period::next
Period::previous
Period::__toString
using ISO8601 representation
version 2.0.0
Added
- Change vendor namespace from
Period
toLeague\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 withPeriod
objectsPeriod::getDuration
accept an optional parameter$get_as_seconds
if used and set totrue
, the method will return a integer which represents the duration in seconds.Period::merge
now accepts one or morePeriod
objects to return thePeriod
object which contains all submittedPeriod
objects.
version 1.0.1
- 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
First stable release