PHP's time range API
Period::rangeForward
allows iteration over a set of dates and times, recurring at regular intervals, over the instance forward starting from the instance start.Period::rangeBackwards
Allows iteration over a set of dates and times, recurring at regular intervals, over the instance backwards starting from the instance ending.Period::fromRange
returns a new Period
instance from a DatePeriod
object. Only usable in PHP8.2+ installationPeriod::dateRangeForward
use instead Period::rangeForward
Period::dateRangeBackwards
use instead Period::rangeBackwards
IntervalError
used as the error interface marker.InvalidInterval
exception for anything regarding creating an object.Duration::fromSeconds
uses a dedicated fraction parameter and the seconds are no longer expressed using a float
value.Period::fromTimestamp
to instantiate a time range object from two timestamps.Period::fromIso80000
to instantiate a time range object from a mathematical representation and a date format.Period::fromBourbaki
to instantiate a time range object from a mathematical representation and a date format.Period
duration comparison methods accepts also Duration
and DateInterval
in addition to Period
objects.Period::union
Period::snapTo*
methods to ease period expansion.Period::meets
Period::meetsOnStart
Period::meetsOnEnd
Period::toBourbaki
Period::toIso80000
Period::toBourbaki
Bounds
Enumeration.InitialDatePresence
Enumeration.Sequence::toList
Chart\LetterCase
Enumeration.Chart\Alignment
Enumeration.Chart\StreamOutput
class to replace Chart\ConsoleOutput
class.Chart\Terminal
Enumeration.Chart\ChartError
used as the chart error interface marker.Chart\UnableToDrawChart
exception for anything regarding drawing a chart out of Period
and/or Sequence
objects.Closure
object instead of the callable
pseudo type with the Sequence
methods.Period::diff
returns a Sequence
instance instead of an array.Period::__construct
is private.Period
named constructors, all parameters are required except for the boundaries.Period::timeDuration
now returns an int
instead of a float
value.Period::intersect
now can take multiple Period
instances as parameters.Period::subtract
now can take multiple Period
instances as parameters.Duration
no longer extends a DateInterval
object.Duration::fromIsoString
supports 3 versions of dealing with fractions with ISO valid string.Datepoint
class renamed DatePoint
.DatePoint
no longer extends a DateTimeImmutable
object.Chart\LatinLetter
in case of wrong value will fall back to A
instead of 0
which is not a letter.Chart\LatinLetter
the starting label must be explicit on instantiation.Chart\RomanNumber
requires its two arguments to be explicitly set.Period::fromDatepoint
replaced by Period::fromDate
Period::getStartDate
replaced by accessing readonly property Period::startDate
Period::getEndDate
replaced by accessing readonly property Period::endDate
Period::getBoundaryType
replaced by accessing readonly property Period::bounds
Period::getDateInterval
replaced by Period::dateInterval
Period::getTimestampInterval
replaced by Period::timeDuration
Period::withBoundaryType
replaced by Period::boundedBy
Period::isStartIncluded
with no replacement use Bounds::isStartIncluded
Period::isStartExcluded
with no replacement use Bounds::isStartIncluded
insteadPeriod::isEndIncluded
with no replacement use Bounds::isEndIncluded
Period::isEndExcluded
with no replacement use Bounds::isEndIncluded
insteadPeriod::fromDatePeriod
replaced by Period::fromDateRange
Period::getDatePeriod
replaced by Period::dateRange
Period::getDatePeriodBackwards
replaced by Period::dateRangeBackwards
Period::__string
replaced by Period::toIso8601
Period::format
replaced by Period::toIso80000
Period::split
replaced by Period::splitForward
Period::substract
use Period::subtract
insteadSequence::substract
use Sequence::subtract
insteadSequence::getIntersections
use Sequence::intersections
insteadSequence::getGaps
use Sequence::gaps
insteadSequence::getBoundaries
use Sequence::length
insteadSequence::getTotalTimestampInterval
use Sequence::totalTimeDuration
insteadSequence::toArray
use Sequence::toList
insteadDuration::__toString
and Duration::format
with no replacementDuration::create
is removed with no replacementDatepoint::create
is removed with no replacementcreate
prefix is removed from the Duration
and Datepoint
named constructors.Chart\ConsoleOutput
replaced by Chart\StreamOutput
class.Chart\RomanNumber::isLower
use Chart\LetterCase::isUpper
instead.Chart\RomanNumber::startingAt
use Chart\DecimalNumber::startLabel
public readonly propertyChart\RomanNumber::startsWith
is removed with no replacementChart\RomanNumber::withLetterCase
is removed with no replacementChart\DecimalNumber::startsWith
is removed with no replacementChart\LatinNumber::startsWith
is removed with no replacementChart\LatinNumber::startingAt
use Chart\LatinNumber::startLabel
public readonly propertyChart\AffixLabel::withPrefix
is removed with no replacementChart\AffixLabel::withSuffix
is removed with no replacementChart\AffixLabel::prefix
method use Chart\AffixLabel::labelPrefix
public readonly propertyChart\AffixLabel::suffix
method use Chart\AffixLabel::labelSuffix
public readonly propertyRemoved all the following namespaced functions from the package:
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
Datepoint::second
Datepoint::minute
Datepoint::hour
Datepoint::isoWeek
Datepoint::month
Datepoint::quarter
Datepoint::semester
Datepoint::year
Datepoint::isoYear
Duration::fromDateInterval
Duration::fromSeconds
Duration::fromChronoString
Duration::fromTimeString
Duration::fromDateString
Period::timeDuration
Period::dateInterval
Period::dateRangeForward
Period::dateRangeBackwards
Period::toIso80000
Period::splitForward
Period::timeDurationDiff
Period::boundedBy
Sequence::length
Sequence::totalTimeDuration
Datepoint::getSecond
is deprecated in favor of Datepoint::second
Datepoint::getMinute
is deprecated in favor of Datepoint::minute
Datepoint::getHour
is deprecated in favor of Datepoint::hour
Datepoint::getIsoWeek
is deprecated in favor of Datepoint::isoWeek
Datepoint::getMonth
is deprecated in favor of Datepoint::month
Datepoint::getQuarter
is deprecated in favor of Datepoint::quarter
Datepoint::getSemester
is deprecated in favor of Datepoint::semester
Datepoint::getYear
is deprecated in favor of Datepoint::year
Datepoint::getIsoYear
is deprecated in favor of Datepoint::isoYear
Duration::createfromDateInterval
is deprecated in favor of Datepoint::fromDateInterval
Duration::createfromSeconds
is deprecated in favor of Datepoint::fromSeconds
Duration::createfromChronoString
is deprecated in favor of Datepoint::fromChronoString
Duration::createfromTimeString
is deprecated in favor of Datepoint::fromTimeString
Duration::createfromDateString
is deprecated in favor of Datepoint::fromDateString
Period::getTimestampInterval
is deprecated in favor of Period::timeDuration
Period::getDateInterval
is deprecated in favor of Period::dateInterval
Period::getDatePeriod
is deprecated in favor of Period::dateRangeForward
Period::getDatePeriodBackwards
is deprecated in favor of Period::dateRangeBackwards
Period::format
is deprecated in favor of Period::toIso80000
Period::split
is deprecated in favor of Period::splitForward
Period::withBoundaryType
is deprecated in favor of Period::boundedBy
Period::timestampIntervalDiff
is deprecated in favor of Period::timeDurationDiff
Sequence::boundaries
is deprecated in favor of Sequence::length
Sequence::getTotalTimestampInterval
is deprecated in favor of Sequence::totalTimeDuration
Period::fromDatepoint
Duration::createFromDateInterval
Duration::createFromTimeString
Duration::createFromChronoString
Duration::createFromSeconds
Duration::create
supports DateInterval spec strings.Duration::create
when using a float will now overflow the results up to the Hour unit.Period::toIso8601
Sequence::intersections
method.Period::__string
replaced by Period::toIso8601