All Notable changes to Period
will be documented in this file
- None
- None
- None
- None
Sequence::getTotalTimestampInterval
see PR #79Period::substract
see PR #80Sequence::substract
see PR #81
- Update
Duration::createFromDateString
to take into account DateInterval::createFromDateString bug fix - Update the development tools to PHPUnit8.0 and PHPstan 0.11
- None
- None
Duration::adjustedTo
- Internals: added support for PHP7.4 and PHP8.0 in travis.yml
- None
Duration::withoutCarryOver
useDuration::adjustedTo
instead
- None
Datepoint::isBefore
Datepoint::bordersOnStart
Datepoint::isStarting
Datepoint::isDuring
Datepoint::isEnding
Datepoint::bordersOnEnd
Datepoint::isAfter
Datepoint::abuts
Duration::create
now supports chronometer formatDuration::withoutCarryOver
Period::durationCompare
to take into account Timezone and DST
Duration::__toString
useDuration::format
instead
- None
- 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
- None
Sequence::getIntersections
useSequence::intersections
insteadSequence::getGaps
useSequence::gaps
insteadSequence::getBoundaries
useSequence::boundaries
instead
- None
- None
Datepoint::createFromFormat
see issue #72
- None
- None
Sequence
implements theArrayAccess
interface
Sequence::map
must preserve offset index after modification.
- None
- None
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
- None
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
- None
League\Period\Sequence
League\Period\InvalidIndex
- None
- None
- None
- None
Period::split
does not work with daylight saving see issue #68
- None
- None
Exception
class
Period::durationCompare
Period::durationEquals
Period::format
Period::expand
Period::equals
Period::getDatePeriodBackwards
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
- The
Period
class is now final Period::JsonSerialize
now returns datepoint in JavaScript compatible notationPeriod::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.
- None
- Support for PHP
7.0
Period::next
Period::previous
Period::add
Period::sub
Period::createFromYear
replaced byLeague\Period\year
Period::createFromMonth
replaced byLeague\Period\month
Period::createFromWeek
replaced byLeague\Period\iso_week
Period::createFromDay
replaced byLeague\Period\day
Period::createFromSemester
replaced byLeague\Period\semester
Period::createFromQuarter
replaced byLeague\Period\quarter
Period::createFromDuration
replaced byLeague\Period\interval_after
Period::createFromDurationBeforeEnd
replaced byLeague\Period\interval_before
Period::sameValueAs
replaced byPeriod::equals
Period::sameDurationAs
replaced byPeriod::durationEquals
Period::compareDuration
replaced byPeriod::durationCompare
Period::withDuration
replaced byPeriod::withDurationAfterStart
Period::withDurationBeforeEnd
Period::splitBackwards
- None
- None
- None
Period::move
Period::moveStartDate
Period::moveEndDate
- None
Period::add
you should usePeriod::moveEndDate
insteadPeriod::sub
you should usePeriod::moveEndDate
instead
- None
Period::__set_state
- autoloader to use the library without composer
- None
- None
- None
Period::contains
see issue #31- microseconds are taken into account when converting
DateTimeInterface
objects.
- None
- None
Period::createFromDay
Period::getDatePeriod
adding the$option
parameterDateTime
toDateTimeImmutable
convertion improved for PHP 5.6+ version- Bumped version requirement to PHP 5.5.9 because of a bug in
DatePeriod
constructor
- None
- None
- None
Period::contains
see issue #28
- None
- None
Period
implements theJsonSerializable
interfacePeriod
can now be extended
Period
always returnsDateTimeImmutable
objectsPeriod::split
returns aGenerator
Period::merge
no longer throwsRuntimeException
- None
- support for PHP 5.4
Period::getStart
Period::getEnd
Period::getRange
Period::duration
Period::durationDiff
Period
always returnsDateTime
objects even when givenDateTimeImmutable
objects.
Period::split
to split aPeriod
object into smallerPeriod
objectsPeriod::getDatePeriod
Period::getDateInterval
Period::getTimestampInterval
Period::getStartDate
Period::getEndDate
Period::dateIntervalDiff
Period::timestampIntervalDiff
DateInterval
validation when created from an integer.
Period::getStart
you should usePeriod::getStartDate
insteadPeriod::getEnd
you should usePeriod::getEndDate
insteadPeriod::getRange
you should usePeriod::getDatePeriod
insteadPeriod::duration
you should usePeriod::getDateInterval
orPeriod::getTimestampInterval
insteadPeriod::durationDiff
you should usePeriod::dateIntervalDiff
orPeriod::timestampIntervalDiff
instead
- support for PHP 5.3
- Modifying methods:
Period::diff
- Added support for
DateTimeInterface
interface
- Named constructor:
Period::createFromDurationBeforeEnd
Period::isBefore
Period::isAfter
bug fixed. must take into account the half-open implementation of aPeriod
object.
- Modifying methods:
Period::gap
- Comparing methods:
Period::abuts
Period::isAfter
Period::isBefore
Period::overlaps
bug fixed issue #8
- Modifying methods:
Period::next
Period::previous
Period::__toString
using ISO8601 representation
- 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
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.
- The
$interval
parameter can also an integer which represents the interval expressed in seconds.
First stable release of Period