Methods |
public
static
|
make(mixed $var): static|null
Make a CarbonPeriod instance from given variable if possible.
Make a CarbonPeriod instance from given variable if possible.
|
#
|
public
static
|
instance(CarbonPeriod|DatePeriod $period): static
Create a new instance from a DatePeriod or CarbonPeriod object.
Create a new instance from a DatePeriod or CarbonPeriod object.
|
#
|
public
static
|
create(...$params): static
Create a new instance.
|
#
|
public
static
|
createFromArray(array $params): static
Create a new instance from an array of parameters.
Create a new instance from an array of parameters.
|
#
|
public
static
|
createFromIso(string $iso, int|null $options = null): static
Create CarbonPeriod from ISO 8601 string.
Create CarbonPeriod from ISO 8601 string.
|
#
|
public
static
|
macro(string $name, object|callable $macro): void
Register a custom macro.
|
#
|
public
static
|
mixin(object|string $mixin): void
Register macros from a mixin object.
Register macros from a mixin object.
Throws
|
#
|
public
static
|
hasMacro(string $name): bool
Check if macro is registered.
Check if macro is registered.
|
#
|
public
static
|
__callStatic(string $method, array $parameters): mixed
Provide static proxy for instance aliases.
Provide static proxy for instance aliases.
|
#
|
public
|
__construct(...$arguments)
CarbonPeriod constructor.
CarbonPeriod constructor.
Throws
|
#
|
public
|
copy(): static
Get a copy of the instance.
Get a copy of the instance.
|
#
|
public
|
get(string $name): bool|CarbonInterface|CarbonInterval|int|null
Get a property allowing both `DatePeriod` snakeCase and camelCase names.
Get a property allowing both DatePeriod snakeCase and camelCase names.
|
#
|
public
|
__get(string $name): bool|CarbonInterface|CarbonInterval|int|null
Get a property allowing both `DatePeriod` snakeCase and camelCase names.
Get a property allowing both DatePeriod snakeCase and camelCase names.
|
#
|
public
|
__isset(string $name): bool
Check if an attribute exists on the object
Check if an attribute exists on the object
|
#
|
public
|
clone(): static
|
#
|
public
|
setDateClass(string $dateClass): static
Set the iteration item class.
Set the iteration item class.
|
#
|
public
|
getDateClass(): string
Returns iteration item date class.
Returns iteration item date class.
|
#
|
public
|
setDateInterval(DateInterval|string $interval): static
Change the period date interval.
Change the period date interval.
Throws
|
#
|
public
|
invertDateInterval(): static
Invert the period date interval.
Invert the period date interval.
|
#
|
public
|
setDates(DateTime|DateTimeInterface|string $start, DateTime|DateTimeInterface|string|null $end): static
Set start and end date.
|
#
|
public
|
setOptions(int|null $options): static
Change the period options.
Change the period options.
Throws
|
#
|
public
|
getOptions(): int
Get the period options.
|
#
|
public
|
toggleOptions(int $options, bool|null $state = null): static
Toggle given options on or off.
Toggle given options on or off.
Throws
|
#
|
public
|
excludeStartDate(bool $state = true): static
Toggle EXCLUDE_START_DATE option.
Toggle EXCLUDE_START_DATE option.
|
#
|
public
|
excludeEndDate(bool $state = true): static
Toggle EXCLUDE_END_DATE option.
Toggle EXCLUDE_END_DATE option.
|
#
|
public
|
getDateInterval(): CarbonInterval
Get the underlying date interval.
Get the underlying date interval.
|
#
|
public
|
getStartDate(string|null $rounding = null): CarbonInterface
Get start date of the period.
Get start date of the period.
Parameters
$rounding |
Optional rounding 'floor', 'ceil', 'round' using the period interval.
|
|
#
|
public
|
getEndDate(string|null $rounding = null): CarbonInterface|null
Get end date of the period.
Get end date of the period.
Parameters
$rounding |
Optional rounding 'floor', 'ceil', 'round' using the period interval.
|
|
#
|
public
|
getRecurrences(): int|float|null
Get number of recurrences.
Get number of recurrences.
|
#
|
public
|
isStartExcluded(): bool
Returns true if the start date should be excluded.
Returns true if the start date should be excluded.
|
#
|
public
|
isEndExcluded(): bool
Returns true if the end date should be excluded.
Returns true if the end date should be excluded.
|
#
|
public
|
isStartIncluded(): bool
Returns true if the start date should be included.
Returns true if the start date should be included.
|
#
|
public
|
isEndIncluded(): bool
Returns true if the end date should be included.
Returns true if the end date should be included.
|
#
|
public
|
getIncludedStartDate(): CarbonInterface
Return the start if it's included by option, else return the start + 1 period interval.
Return the start if it's included by option, else return the start + 1 period interval.
|
#
|
public
|
getIncludedEndDate(): CarbonInterface
Return the end if it's included by option, else return the end - 1 period interval.
Warning: if the period has no fixed…
Return the end if it's included by option, else return the end - 1 period interval.
Warning: if the period has no fixed end, this method will iterate the period to calculate it.
|
#
|
public
|
addFilter(callable $callback, string $name = null): static
Add a filter to the stack.
Add a filter to the stack.
|
#
|
public
|
prependFilter(callable $callback, string $name = null): static
Prepend a filter to the stack.
Prepend a filter to the stack.
|
#
|
public
|
removeFilter(callable|string $filter): static
Remove a filter by instance or name.
Remove a filter by instance or name.
|
#
|
public
|
hasFilter(callable|string $filter): bool
Return whether given instance or name is in the filter stack.
Return whether given instance or name is in the filter stack.
|
#
|
public
|
getFilters(): array
Get filters stack.
|
#
|
public
|
setFilters(array $filters): static
Set filters stack.
|
#
|
public
|
resetFilters(): static
Reset filters stack.
|
#
|
public
|
setRecurrences(int|float|null $recurrences): static
Add a recurrences filter (set maximum number of recurrences).
Add a recurrences filter (set maximum number of recurrences).
Throws
|
#
|
public
|
setStartDate(DateTime|DateTimeInterface|string $date, bool|null $inclusive = null): static
Change the period start date.
Change the period start date.
Throws
|
#
|
public
|
setEndDate(DateTime|DateTimeInterface|string|null $date, bool|null $inclusive = null): static
Change the period end date.
Change the period end date.
Throws
|
#
|
public
|
valid(): bool
Check if the current position is valid.
Check if the current position is valid.
Implements
|
#
|
public
|
key(): int|null
Return the current key.
|
#
|
public
|
current(): CarbonInterface|null
Return the current date.
|
#
|
public
|
next(): void
Move forward to the next date.
Move forward to the next date.
Throws
Implements
|
#
|
public
|
rewind(): void
Rewind to the start date.
Rewind to the start date.
Iterating over a date in the UTC timezone avoids bug during backward DST change.
Throws
Implements
|
#
|
public
|
skip(int $count = 1): bool
Skip iterations and returns iteration state (false if ended, true if still valid).
Skip iterations and returns iteration state (false if ended, true if still valid).
Parameters
$count |
steps number to skip (1 by default)
|
|
#
|
public
|
toIso8601String(): string
Format the date period as ISO 8601.
Format the date period as ISO 8601.
|
#
|
public
|
toString(): string
Convert the date period into a string.
Convert the date period into a string.
|
#
|
public
|
spec(): string
Format the date period as ISO 8601.
Format the date period as ISO 8601.
|
#
|
public
|
cast(string $className): DatePeriod
Cast the current instance into the given class.
Cast the current instance into the given class.
Parameters
$className |
The $className::instance() method will be called to cast the current object.
|
|
#
|
public
|
toDatePeriod(): DatePeriod
Return native DatePeriod PHP object matching the current instance.
Return native DatePeriod PHP object matching the current instance.
|
#
|
public
|
isUnfilteredAndEndLess(): bool
Return `true` if the period has no custom filter and is guaranteed to be endless.
Return true if the period has no custom filter and is guaranteed to be endless.
Note that we can't check if a period is endless as soon as it has custom filters
because filters can emit CarbonPeriod::END_ITERATION to stop the iteration in
a way we can't predict without actually iterating the period.
|
#
|
public
|
toArray(): CarbonInterface[]
Convert the date period into an array without changing current iteration state.
Convert the date period into an array without changing current iteration state.
|
#
|
public
|
count(): int
Count dates in the date period.
Count dates in the date period.
Implements
|
#
|
public
|
first(): CarbonInterface|null
Return the first date in the date period.
Return the first date in the date period.
|
#
|
public
|
last(): CarbonInterface|null
Return the last date in the date period.
Return the last date in the date period.
|
#
|
public
|
__toString(): string
Convert the date period into a string.
Convert the date period into a string.
|
#
|
public
|
__call(string $method, array $parameters): mixed
Add aliases for setters.
Add aliases for setters.
CarbonPeriod::days(3)->hours(5)->invert()
->sinceNow()->until('2010-01-10')
->filter(...)
->count()
Note: We use magic method to let static and instance aliases with the same names.
|
#
|
public
|
setTimezone(DateTimeZone|string $timezone): static
Set the instance's timezone from a string or object and apply it to start/end.
Set the instance's timezone from a string or object and apply it to start/end.
|
#
|
public
|
shiftTimezone(DateTimeZone|string $timezone): static
Set the instance's timezone from a string or object and add/subtract the offset difference to start/end.
Set the instance's timezone from a string or object and add/subtract the offset difference to start/end.
|
#
|
public
|
calculateEnd(string|null $rounding = null): CarbonInterface
Returns the end is set, else calculated from start an recurrences.
Returns the end is set, else calculated from start an recurrences.
Parameters
$rounding |
Optional rounding 'floor', 'ceil', 'round' using the period interval.
|
|
#
|
public
|
overlaps(
CarbonPeriod|DateTimeInterface|Carbon|CarbonImmutable|string $rangeOrRangeStart,
DateTimeInterface|Carbon|CarbonImmutable|string|null $rangeEnd = null,
): bool
Returns true if the current period overlaps the given one (if 1 parameter passed)
or the period between 2 dates (if 2…
Returns true if the current period overlaps the given one (if 1 parameter passed)
or the period between 2 dates (if 2 parameters passed).
|
#
|
public
|
forEach(callable $callback)
Execute a given function on each date of the period.
Execute a given function on each date of the period.
|
#
|
public
|
map(callable $callback): Generator
Execute a given function on each date of the period and yield the result of this function.
Execute a given function on each date of the period and yield the result of this function.
|
#
|
public
|
eq(mixed $period): bool
Determines if the instance is equal to another.
Warning: if options differ, instances wil never be equal.
Determines if the instance is equal to another.
Warning: if options differ, instances wil never be equal.
|
#
|
public
|
equalTo(mixed $period): bool
Determines if the instance is equal to another.
Warning: if options differ, instances wil never be equal.
Determines if the instance is equal to another.
Warning: if options differ, instances wil never be equal.
|
#
|
public
|
ne(mixed $period): bool
Determines if the instance is not equal to another.
Warning: if options differ, instances wil never be equal.
Determines if the instance is not equal to another.
Warning: if options differ, instances wil never be equal.
|
#
|
public
|
notEqualTo(mixed $period): bool
Determines if the instance is not equal to another.
Warning: if options differ, instances wil never be equal.
Determines if the instance is not equal to another.
Warning: if options differ, instances wil never be equal.
|
#
|
public
|
startsBefore(mixed $date = null): bool
Determines if the start date is before an other given date.
(Rather start/end are included by options is ignored.)
Determines if the start date is before an other given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
startsBeforeOrAt(mixed $date = null): bool
Determines if the start date is before or the same as a given date.
(Rather start/end are included by options is…
Determines if the start date is before or the same as a given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
startsAfter(mixed $date = null): bool
Determines if the start date is after an other given date.
(Rather start/end are included by options is ignored.)
Determines if the start date is after an other given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
startsAfterOrAt(mixed $date = null): bool
Determines if the start date is after or the same as a given date.
(Rather start/end are included by options is ignored…
Determines if the start date is after or the same as a given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
startsAt(mixed $date = null): bool
Determines if the start date is the same as a given date.
(Rather start/end are included by options is ignored.)
Determines if the start date is the same as a given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
endsBefore(mixed $date = null): bool
Determines if the end date is before an other given date.
(Rather start/end are included by options is ignored.)
Determines if the end date is before an other given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
endsBeforeOrAt(mixed $date = null): bool
Determines if the end date is before or the same as a given date.
(Rather start/end are included by options is ignored.)
Determines if the end date is before or the same as a given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
endsAfter(mixed $date = null): bool
Determines if the end date is after an other given date.
(Rather start/end are included by options is ignored.)
Determines if the end date is after an other given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
endsAfterOrAt(mixed $date = null): bool
Determines if the end date is after or the same as a given date.
(Rather start/end are included by options is ignored.)
Determines if the end date is after or the same as a given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
endsAt(mixed $date = null): bool
Determines if the end date is the same as a given date.
(Rather start/end are included by options is ignored.)
Determines if the end date is the same as a given date.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
isStarted(): bool
Return true if start date is now or later.
(Rather start/end are included by options is ignored.)
Return true if start date is now or later.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
isEnded(): bool
Return true if end date is now or later.
(Rather start/end are included by options is ignored.)
Return true if end date is now or later.
(Rather start/end are included by options is ignored.)
|
#
|
public
|
isInProgress(): bool
Return true if now is between start date (included) and end date (excluded).
(Rather start/end are included by options…
Return true if now is between start date (included) and end date (excluded).
(Rather start/end are included by options is ignored.)
|
#
|
public
|
roundUnit(string $unit, float|int|string|DateInterval|null $precision = 1, string $function = 'round'): static
Round the current instance at the given unit with given precision if specified and the given function.
Round the current instance at the given unit with given precision if specified and the given function.
|
#
|
public
|
floorUnit(string $unit, float|int|string|DateInterval|null $precision = 1): static
Truncate the current instance at the given unit with given precision if specified.
Truncate the current instance at the given unit with given precision if specified.
|
#
|
public
|
ceilUnit(string $unit, float|int|string|DateInterval|null $precision = 1): static
Ceil the current instance at the given unit with given precision if specified.
Ceil the current instance at the given unit with given precision if specified.
|
#
|
public
|
round(float|int|string|DateInterval|null $precision = null, string $function = 'round'): static
Round the current instance second with given precision if specified (else period interval is used).
Round the current instance second with given precision if specified (else period interval is used).
|
#
|
public
|
floor(float|int|string|DateInterval|null $precision = null): static
Round the current instance second with given precision if specified (else period interval is used).
Round the current instance second with given precision if specified (else period interval is used).
|
#
|
public
|
ceil(float|int|string|DateInterval|null $precision = null): static
Ceil the current instance second with given precision if specified (else period interval is used).
Ceil the current instance second with given precision if specified (else period interval is used).
|
#
|
public
|
jsonSerialize(): CarbonInterface[]
Specify data which should be serialized to JSON.
Specify data which should be serialized to JSON.
Implements
|
#
|
public
|
contains(Carbon|CarbonPeriod|CarbonInterval|DateInterval|DatePeriod|DateTimeInterface|string|null $date = null): bool
Return true if the given date is between start and end.
Return true if the given date is between start and end.
|
#
|
public
|
follows(CarbonPeriod|DatePeriod|string $period, ...$arguments): bool
Return true if the current period follows a given other period (with no overlap).
For instance, [2019-08-01 -> 2019-08…
Return true if the current period follows a given other period (with no overlap).
For instance, [2019-08-01 -> 2019-08-12] follows [2019-07-29 -> 2019-07-31]
Note than in this example, follows() would be false if 2019-08-01 or 2019-07-31 was excluded by options.
|
#
|
public
|
isFollowedBy(CarbonPeriod|DatePeriod|string $period, ...$arguments): bool
Return true if the given other period follows the current one (with no overlap).
For instance, [2019-07-29 -> 2019-07…
Return true if the given other period follows the current one (with no overlap).
For instance, [2019-07-29 -> 2019-07-31] is followed by [2019-08-01 -> 2019-08-12]
Note than in this example, isFollowedBy() would be false if 2019-08-01 or 2019-07-31 was excluded by options.
|
#
|
public
|
isConsecutiveWith(CarbonPeriod|DatePeriod|string $period, ...$arguments): bool
Return true if the given period either follows or is followed by the current one.
Return true if the given period either follows or is followed by the current one.
|
#
|
public
static
|
start($date, $inclusive = null): CarbonPeriod
Create instance specifying start date or modify the start date if called on an instance.
Create instance specifying start date or modify the start date if called on an instance.
|
#
|
public
static
|
since($date, $inclusive = null): CarbonPeriod
Alias for start().
|
#
|
public
static
|
sinceNow($inclusive = null): CarbonPeriod
Create instance with start date set to now or set the start date to now if called on an instance.
Create instance with start date set to now or set the start date to now if called on an instance.
|
#
|
public
static
|
end($date = null, $inclusive = null): CarbonPeriod
Create instance specifying end date or modify the end date if called on an instance.
Create instance specifying end date or modify the end date if called on an instance.
|
#
|
public
static
|
until($date = null, $inclusive = null): CarbonPeriod
Alias for end().
|
#
|
public
static
|
untilNow($inclusive = null): CarbonPeriod
Create instance with end date set to now or set the end date to now if called on an instance.
Create instance with end date set to now or set the end date to now if called on an instance.
|
#
|
public
static
|
dates($start, $end = null): CarbonPeriod
Create instance with start and end dates or modify the start and end dates if called on an instance.
Create instance with start and end dates or modify the start and end dates if called on an instance.
|
#
|
public
static
|
between($start, $end = null): CarbonPeriod
Create instance with start and end dates or modify the start and end dates if called on an instance.
Create instance with start and end dates or modify the start and end dates if called on an instance.
|
#
|
public
static
|
recurrences($recurrences = null): CarbonPeriod
Create instance with maximum number of recurrences or modify the number of recurrences if called on an instance.
Create instance with maximum number of recurrences or modify the number of recurrences if called on an instance.
|
#
|
public
static
|
times($recurrences = null): CarbonPeriod
Alias for recurrences().
|
#
|
public
static
|
options($options = null): CarbonPeriod
Create instance with options or modify the options if called on an instance.
Create instance with options or modify the options if called on an instance.
|
#
|
public
static
|
toggle($options, $state = null): CarbonPeriod
Create instance with options toggled on or off, or toggle options if called on an instance.
Create instance with options toggled on or off, or toggle options if called on an instance.
|
#
|
public
static
|
filter($callback, $name = null): CarbonPeriod
Create instance with filter added to the stack or append a filter if called on an instance.
Create instance with filter added to the stack or append a filter if called on an instance.
|
#
|
public
static
|
push($callback, $name = null): CarbonPeriod
Alias for filter().
|
#
|
public
static
|
prepend($callback, $name = null): CarbonPeriod
Create instance with filter prepended to the stack or prepend a filter if called on an instance.
Create instance with filter prepended to the stack or prepend a filter if called on an instance.
|
#
|
public
static
|
filters(array $filters = []): CarbonPeriod
Create instance with filters stack or replace the whole filters stack if called on an instance.
Create instance with filters stack or replace the whole filters stack if called on an instance.
|
#
|
public
static
|
interval($interval): CarbonPeriod
Create instance with given date interval or modify the interval if called on an instance.
Create instance with given date interval or modify the interval if called on an instance.
|
#
|
public
static
|
each($interval): CarbonPeriod
Create instance with given date interval or modify the interval if called on an instance.
Create instance with given date interval or modify the interval if called on an instance.
|
#
|
public
static
|
every($interval): CarbonPeriod
Create instance with given date interval or modify the interval if called on an instance.
Create instance with given date interval or modify the interval if called on an instance.
|
#
|
public
static
|
step($interval): CarbonPeriod
Create instance with given date interval or modify the interval if called on an instance.
Create instance with given date interval or modify the interval if called on an instance.
|
#
|
public
static
|
stepBy($interval): CarbonPeriod
Create instance with given date interval or modify the interval if called on an instance.
Create instance with given date interval or modify the interval if called on an instance.
|
#
|
public
static
|
invert(): CarbonPeriod
Create instance with inverted date interval or invert the interval if called on an instance.
Create instance with inverted date interval or invert the interval if called on an instance.
|
#
|
public
static
|
years($years = 1): CarbonPeriod
Create instance specifying a number of years for date interval or replace the interval by the given a number of years…
Create instance specifying a number of years for date interval or replace the interval by the given a number of years if called on an instance.
|
#
|
public
static
|
year($years = 1): CarbonPeriod
Alias for years().
|
#
|
public
static
|
months($months = 1): CarbonPeriod
Create instance specifying a number of months for date interval or replace the interval by the given a number of months…
Create instance specifying a number of months for date interval or replace the interval by the given a number of months if called on an instance.
|
#
|
public
static
|
month($months = 1): CarbonPeriod
Alias for months().
|
#
|
public
static
|
weeks($weeks = 1): CarbonPeriod
Create instance specifying a number of weeks for date interval or replace the interval by the given a number of weeks…
Create instance specifying a number of weeks for date interval or replace the interval by the given a number of weeks if called on an instance.
|
#
|
public
static
|
week($weeks = 1): CarbonPeriod
Alias for weeks().
|
#
|
public
static
|
days($days = 1): CarbonPeriod
Create instance specifying a number of days for date interval or replace the interval by the given a number of days if…
Create instance specifying a number of days for date interval or replace the interval by the given a number of days if called on an instance.
|
#
|
public
static
|
dayz($days = 1): CarbonPeriod
Alias for days().
|
#
|
public
static
|
day($days = 1): CarbonPeriod
Alias for days().
|
#
|
public
static
|
hours($hours = 1): CarbonPeriod
Create instance specifying a number of hours for date interval or replace the interval by the given a number of hours…
Create instance specifying a number of hours for date interval or replace the interval by the given a number of hours if called on an instance.
|
#
|
public
static
|
hour($hours = 1): CarbonPeriod
Alias for hours().
|
#
|
public
static
|
minutes($minutes = 1): CarbonPeriod
Create instance specifying a number of minutes for date interval or replace the interval by the given a number of…
Create instance specifying a number of minutes for date interval or replace the interval by the given a number of minutes if called on an instance.
|
#
|
public
static
|
minute($minutes = 1): CarbonPeriod
Alias for minutes().
|
#
|
public
static
|
seconds($seconds = 1): CarbonPeriod
Create instance specifying a number of seconds for date interval or replace the interval by the given a number of…
Create instance specifying a number of seconds for date interval or replace the interval by the given a number of seconds if called on an instance.
|
#
|
public
static
|
second($seconds = 1): CarbonPeriod
Alias for seconds().
|
#
|
public
|
roundYear(float $precision = 1, string $function = "\"round\""): $this
Round the current instance year with given precision using the given function.
Round the current instance year with given precision using the given function.
|
#
|
public
|
roundYears(float $precision = 1, string $function = "\"round\""): $this
Round the current instance year with given precision using the given function.
Round the current instance year with given precision using the given function.
|
#
|
public
|
floorYear(float $precision = 1): $this
Truncate the current instance year with given precision.
Truncate the current instance year with given precision.
|
#
|
public
|
floorYears(float $precision = 1): $this
Truncate the current instance year with given precision.
Truncate the current instance year with given precision.
|
#
|
public
|
ceilYear(float $precision = 1): $this
Ceil the current instance year with given precision.
Ceil the current instance year with given precision.
|
#
|
public
|
ceilYears(float $precision = 1): $this
Ceil the current instance year with given precision.
Ceil the current instance year with given precision.
|
#
|
public
|
roundMonth(float $precision = 1, string $function = "\"round\""): $this
Round the current instance month with given precision using the given function.
Round the current instance month with given precision using the given function.
|
#
|
public
|
roundMonths(float $precision = 1, string $function = "\"round\""): $this
Round the current instance month with given precision using the given function.
Round the current instance month with given precision using the given function.
|
#
|
public
|
floorMonth(float $precision = 1): $this
Truncate the current instance month with given precision.
Truncate the current instance month with given precision.
|
#
|
public
|
floorMonths(float $precision = 1): $this
Truncate the current instance month with given precision.
Truncate the current instance month with given precision.
|
#
|
public
|
ceilMonth(float $precision = 1): $this
Ceil the current instance month with given precision.
Ceil the current instance month with given precision.
|
#
|
public
|
ceilMonths(float $precision = 1): $this
Ceil the current instance month with given precision.
Ceil the current instance month with given precision.
|
#
|
public
|
roundWeek(float $precision = 1, string $function = "\"round\""): $this
Round the current instance day with given precision using the given function.
Round the current instance day with given precision using the given function.
|
#
|
public
|
roundWeeks(float $precision = 1, string $function = "\"round\""): $this
Round the current instance day with given precision using the given function.
Round the current instance day with given precision using the given function.
|
#
|
public
|
floorWeek(float $precision = 1): $this
Truncate the current instance day with given precision.
Truncate the current instance day with given precision.
|
#
|
public
|
floorWeeks(float $precision = 1): $this
Truncate the current instance day with given precision.
Truncate the current instance day with given precision.
|
#
|
public
|
ceilWeek(float $precision = 1): $this
Ceil the current instance day with given precision.
Ceil the current instance day with given precision.
|
#
|
public
|
ceilWeeks(float $precision = 1): $this
Ceil the current instance day with given precision.
Ceil the current instance day with given precision.
|
#
|
public
|
roundDay(float $precision = 1, string $function = "\"round\""): $this
Round the current instance day with given precision using the given function.
Round the current instance day with given precision using the given function.
|
#
|
public
|
roundDays(float $precision = 1, string $function = "\"round\""): $this
Round the current instance day with given precision using the given function.
Round the current instance day with given precision using the given function.
|
#
|
public
|
floorDay(float $precision = 1): $this
Truncate the current instance day with given precision.
Truncate the current instance day with given precision.
|
#
|
public
|
floorDays(float $precision = 1): $this
Truncate the current instance day with given precision.
Truncate the current instance day with given precision.
|
#
|
public
|
ceilDay(float $precision = 1): $this
Ceil the current instance day with given precision.
Ceil the current instance day with given precision.
|
#
|
public
|
ceilDays(float $precision = 1): $this
Ceil the current instance day with given precision.
Ceil the current instance day with given precision.
|
#
|
public
|
roundHour(float $precision = 1, string $function = "\"round\""): $this
Round the current instance hour with given precision using the given function.
Round the current instance hour with given precision using the given function.
|
#
|
public
|
roundHours(float $precision = 1, string $function = "\"round\""): $this
Round the current instance hour with given precision using the given function.
Round the current instance hour with given precision using the given function.
|
#
|
public
|
floorHour(float $precision = 1): $this
Truncate the current instance hour with given precision.
Truncate the current instance hour with given precision.
|
#
|
public
|
floorHours(float $precision = 1): $this
Truncate the current instance hour with given precision.
Truncate the current instance hour with given precision.
|
#
|
public
|
ceilHour(float $precision = 1): $this
Ceil the current instance hour with given precision.
Ceil the current instance hour with given precision.
|
#
|
public
|
ceilHours(float $precision = 1): $this
Ceil the current instance hour with given precision.
Ceil the current instance hour with given precision.
|
#
|
public
|
roundMinute(float $precision = 1, string $function = "\"round\""): $this
Round the current instance minute with given precision using the given function.
Round the current instance minute with given precision using the given function.
|
#
|
public
|
roundMinutes(float $precision = 1, string $function = "\"round\""): $this
Round the current instance minute with given precision using the given function.
Round the current instance minute with given precision using the given function.
|
#
|
public
|
floorMinute(float $precision = 1): $this
Truncate the current instance minute with given precision.
Truncate the current instance minute with given precision.
|
#
|
public
|
floorMinutes(float $precision = 1): $this
Truncate the current instance minute with given precision.
Truncate the current instance minute with given precision.
|
#
|
public
|
ceilMinute(float $precision = 1): $this
Ceil the current instance minute with given precision.
Ceil the current instance minute with given precision.
|
#
|
public
|
ceilMinutes(float $precision = 1): $this
Ceil the current instance minute with given precision.
Ceil the current instance minute with given precision.
|
#
|
public
|
roundSecond(float $precision = 1, string $function = "\"round\""): $this
Round the current instance second with given precision using the given function.
Round the current instance second with given precision using the given function.
|
#
|
public
|
roundSeconds(float $precision = 1, string $function = "\"round\""): $this
Round the current instance second with given precision using the given function.
Round the current instance second with given precision using the given function.
|
#
|
public
|
floorSecond(float $precision = 1): $this
Truncate the current instance second with given precision.
Truncate the current instance second with given precision.
|
#
|
public
|
floorSeconds(float $precision = 1): $this
Truncate the current instance second with given precision.
Truncate the current instance second with given precision.
|
#
|
public
|
ceilSecond(float $precision = 1): $this
Ceil the current instance second with given precision.
Ceil the current instance second with given precision.
|
#
|
public
|
ceilSeconds(float $precision = 1): $this
Ceil the current instance second with given precision.
Ceil the current instance second with given precision.
|
#
|
public
|
roundMillennium(float $precision = 1, string $function = "\"round\""): $this
Round the current instance millennium with given precision using the given function.
Round the current instance millennium with given precision using the given function.
|
#
|
public
|
roundMillennia(float $precision = 1, string $function = "\"round\""): $this
Round the current instance millennium with given precision using the given function.
Round the current instance millennium with given precision using the given function.
|
#
|
public
|
floorMillennium(float $precision = 1): $this
Truncate the current instance millennium with given precision.
Truncate the current instance millennium with given precision.
|
#
|
public
|
floorMillennia(float $precision = 1): $this
Truncate the current instance millennium with given precision.
Truncate the current instance millennium with given precision.
|
#
|
public
|
ceilMillennium(float $precision = 1): $this
Ceil the current instance millennium with given precision.
Ceil the current instance millennium with given precision.
|
#
|
public
|
ceilMillennia(float $precision = 1): $this
Ceil the current instance millennium with given precision.
Ceil the current instance millennium with given precision.
|
#
|
public
|
roundCentury(float $precision = 1, string $function = "\"round\""): $this
Round the current instance century with given precision using the given function.
Round the current instance century with given precision using the given function.
|
#
|
public
|
roundCenturies(float $precision = 1, string $function = "\"round\""): $this
Round the current instance century with given precision using the given function.
Round the current instance century with given precision using the given function.
|
#
|
public
|
floorCentury(float $precision = 1): $this
Truncate the current instance century with given precision.
Truncate the current instance century with given precision.
|
#
|
public
|
floorCenturies(float $precision = 1): $this
Truncate the current instance century with given precision.
Truncate the current instance century with given precision.
|
#
|
public
|
ceilCentury(float $precision = 1): $this
Ceil the current instance century with given precision.
Ceil the current instance century with given precision.
|
#
|
public
|
ceilCenturies(float $precision = 1): $this
Ceil the current instance century with given precision.
Ceil the current instance century with given precision.
|
#
|
public
|
roundDecade(float $precision = 1, string $function = "\"round\""): $this
Round the current instance decade with given precision using the given function.
Round the current instance decade with given precision using the given function.
|
#
|
public
|
roundDecades(float $precision = 1, string $function = "\"round\""): $this
Round the current instance decade with given precision using the given function.
Round the current instance decade with given precision using the given function.
|
#
|
public
|
floorDecade(float $precision = 1): $this
Truncate the current instance decade with given precision.
Truncate the current instance decade with given precision.
|
#
|
public
|
floorDecades(float $precision = 1): $this
Truncate the current instance decade with given precision.
Truncate the current instance decade with given precision.
|
#
|
public
|
ceilDecade(float $precision = 1): $this
Ceil the current instance decade with given precision.
Ceil the current instance decade with given precision.
|
#
|
public
|
ceilDecades(float $precision = 1): $this
Ceil the current instance decade with given precision.
Ceil the current instance decade with given precision.
|
#
|
public
|
roundQuarter(float $precision = 1, string $function = "\"round\""): $this
Round the current instance quarter with given precision using the given function.
Round the current instance quarter with given precision using the given function.
|
#
|
public
|
roundQuarters(float $precision = 1, string $function = "\"round\""): $this
Round the current instance quarter with given precision using the given function.
Round the current instance quarter with given precision using the given function.
|
#
|
public
|
floorQuarter(float $precision = 1): $this
Truncate the current instance quarter with given precision.
Truncate the current instance quarter with given precision.
|
#
|
public
|
floorQuarters(float $precision = 1): $this
Truncate the current instance quarter with given precision.
Truncate the current instance quarter with given precision.
|
#
|
public
|
ceilQuarter(float $precision = 1): $this
Ceil the current instance quarter with given precision.
Ceil the current instance quarter with given precision.
|
#
|
public
|
ceilQuarters(float $precision = 1): $this
Ceil the current instance quarter with given precision.
Ceil the current instance quarter with given precision.
|
#
|
public
|
roundMillisecond(float $precision = 1, string $function = "\"round\""): $this
Round the current instance millisecond with given precision using the given function.
Round the current instance millisecond with given precision using the given function.
|
#
|
public
|
roundMilliseconds(float $precision = 1, string $function = "\"round\""): $this
Round the current instance millisecond with given precision using the given function.
Round the current instance millisecond with given precision using the given function.
|
#
|
public
|
floorMillisecond(float $precision = 1): $this
Truncate the current instance millisecond with given precision.
Truncate the current instance millisecond with given precision.
|
#
|
public
|
floorMilliseconds(float $precision = 1): $this
Truncate the current instance millisecond with given precision.
Truncate the current instance millisecond with given precision.
|
#
|
public
|
ceilMillisecond(float $precision = 1): $this
Ceil the current instance millisecond with given precision.
Ceil the current instance millisecond with given precision.
|
#
|
public
|
ceilMilliseconds(float $precision = 1): $this
Ceil the current instance millisecond with given precision.
Ceil the current instance millisecond with given precision.
|
#
|
public
|
roundMicrosecond(float $precision = 1, string $function = "\"round\""): $this
Round the current instance microsecond with given precision using the given function.
Round the current instance microsecond with given precision using the given function.
|
#
|
public
|
roundMicroseconds(float $precision = 1, string $function = "\"round\""): $this
Round the current instance microsecond with given precision using the given function.
Round the current instance microsecond with given precision using the given function.
|
#
|
public
|
floorMicrosecond(float $precision = 1): $this
Truncate the current instance microsecond with given precision.
Truncate the current instance microsecond with given precision.
|
#
|
public
|
floorMicroseconds(float $precision = 1): $this
Truncate the current instance microsecond with given precision.
Truncate the current instance microsecond with given precision.
|
#
|
public
|
ceilMicrosecond(float $precision = 1): $this
Ceil the current instance microsecond with given precision.
Ceil the current instance microsecond with given precision.
|
#
|
public
|
ceilMicroseconds(float $precision = 1): $this
Ceil the current instance microsecond with given precision.
Ceil the current instance microsecond with given precision.
|
#
|