Methods |
public
|
setTimezone(DateTimeZone|string $tzName): static
Set the instance's timezone from a string or object.
Set the instance's timezone from a string or object.
|
#
|
public
static
|
getCascadeFactors(): array
Mapping of units and factors for cascading.
Mapping of units and factors for cascading.
Should only be modified by changing the factors or referenced constants.
|
#
|
public
static
|
setCascadeFactors(array $cascadeFactors)
Set default cascading factors for ->cascade() method.
Set default cascading factors for ->cascade() method.
|
#
|
public
|
__construct(
Closure|DateInterval|string|int|null $years = 1,
int|null $months = null,
int|null $weeks = null,
int|null $days = null,
int|null $hours = null,
int|null $minutes = null,
int|null $seconds = null,
int|null $microseconds = null,
)
Create a new CarbonInterval instance.
Create a new CarbonInterval instance.
Throws
Exception |
when the interval_spec (passed as $years) cannot be parsed as an interval.
|
Overrides
|
#
|
public
static
|
getFactor(string $source, string $target): int|float|null
Returns the factor for a given source-to-target couple.
Returns the factor for a given source-to-target couple.
|
#
|
public
static
|
getFactorWithDefault(string $source, string $target): int|float|null
Returns the factor for a given source-to-target couple if set,
else try to find the appropriate constant as the factor,…
Returns the factor for a given source-to-target couple if set,
else try to find the appropriate constant as the factor, such as Carbon::DAYS_PER_WEEK.
|
#
|
public
static
|
getDaysPerWeek(): int|float
Returns current config for days per week.
Returns current config for days per week.
|
#
|
public
static
|
getHoursPerDay(): int|float
Returns current config for hours per day.
Returns current config for hours per day.
|
#
|
public
static
|
getMinutesPerHour(): int|float
Returns current config for minutes per hour.
Returns current config for minutes per hour.
|
#
|
public
static
|
getSecondsPerMinute(): int|float
Returns current config for seconds per minute.
Returns current config for seconds per minute.
|
#
|
public
static
|
getMillisecondsPerSecond(): int|float
Returns current config for microseconds per second.
Returns current config for microseconds per second.
|
#
|
public
static
|
getMicrosecondsPerMillisecond(): int|float
Returns current config for microseconds per second.
Returns current config for microseconds per second.
|
#
|
public
static
|
create(
int $years = 1,
int $months = null,
int $weeks = null,
int $days = null,
int $hours = null,
int $minutes = null,
int $seconds = null,
int $microseconds = null,
): static
Create a new CarbonInterval instance from specific values.
This is an alias for the constructor that allows better…
Create a new CarbonInterval instance from specific values.
This is an alias for the constructor that allows better fluent
syntax as it allows you to do CarbonInterval::create(1)->fn() rather than
(new CarbonInterval(1))->fn().
Throws
Exception |
when the interval_spec (passed as $years) cannot be parsed as an interval.
|
|
#
|
public
static
|
createFromFormat(string $format, string|null $interval): static
Parse a string into a new CarbonInterval object according to the specified format.
Parse a string into a new CarbonInterval object according to the specified format.
Parameters
$format |
Format of the $interval input string
|
$interval |
Input string to convert into an interval
|
Throws
|
#
|
public
|
copy(): static
Get a copy of the instance.
Get a copy of the instance.
|
#
|
public
|
clone(): static
Get a copy of the instance.
Get a copy of the instance.
|
#
|
public
static
|
__callStatic(string $method, array $parameters): static|null
Provide static helpers to create instances. Allows CarbonInterval::years(3).
Provide static helpers to create instances. Allows CarbonInterval::years(3).
Note: This is done using the magic method to allow static and instance methods to
have the same names.
Parameters
$method |
magic method name called
|
$parameters |
parameters list
|
|
#
|
public
static
|
fromString(string $intervalDefinition): static
Creates a CarbonInterval from string.
Creates a CarbonInterval from string.
Format:
Suffix |
Unit |
Example |
DateInterval expression |
y |
years |
1y |
P1Y |
mo |
months |
3mo |
P3M |
w |
weeks |
2w |
P2W |
d |
days |
28d |
P28D |
h |
hours |
4h |
PT4H |
m |
minutes |
12m |
PT12M |
s |
seconds |
59s |
PT59S |
e. g. 1w 3d 4h 32m 23s is converted to 10 days 4 hours 32 minutes and 23 seconds.
Special cases:
- An empty string will return a zero interval
- Fractions are allowed for weeks, days, hours and minutes and will be converted
and rounded to the next smaller value (caution: 0.5w = 4d)
|
#
|
public
static
|
parseFromLocale(string $interval, string|null $locale = null): static
Creates a CarbonInterval from string using a different locale.
Creates a CarbonInterval from string using a different locale.
Parameters
$interval |
interval string in the given language (may also contain English).
|
$locale |
if locale is null or not specified, current global locale will be used instead.
|
|
#
|
public
|
cast(string $className): DateInterval
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
static
|
instance(DateInterval $interval, array $skip = []): static
Create a CarbonInterval instance from a DateInterval one. Can not instance
DateInterval objects created from DateTime:…
Create a CarbonInterval instance from a DateInterval one. Can not instance
DateInterval objects created from DateTime::diff() as you can't externally
set the $days field.
|
#
|
public
static
|
make(mixed|int|DateInterval|string|Closure|null $interval, string|null $unit = null): static|null
Make a CarbonInterval instance from given variable if possible.
Make a CarbonInterval instance from given variable if possible.
Always return a new instance. Parse only strings and only these likely to be intervals (skip dates
and recurrences). Throw an exception for invalid format, but otherwise return null.
Parameters
$interval |
interval or number of the given $unit
|
$unit |
if specified, $interval must be an integer
|
|
#
|
public
static
|
createFromDateString(string $time): static
Sets up a DateInterval from the relative parts of the string.
Sets up a DateInterval from the relative parts of the string.
Overrides
|
#
|
public
|
get(string $name): int|float|string
Get a part of the CarbonInterval object.
Get a part of the CarbonInterval object.
Throws
|
#
|
public
|
__get(string $name): int|float|string
Get a part of the CarbonInterval object.
Get a part of the CarbonInterval object.
Throws
|
#
|
public
|
set(string|array $name, int $value = null): $this
Set a part of the CarbonInterval object.
Set a part of the CarbonInterval object.
Throws
|
#
|
public
|
__set(string $name, int $value)
Set a part of the CarbonInterval object.
Set a part of the CarbonInterval object.
Throws
|
#
|
public
|
weeksAndDays(int $weeks, int $days): static
Allow setting of weeks and days to be cumulative.
Allow setting of weeks and days to be cumulative.
Parameters
$weeks |
Number of weeks to set
|
$days |
Number of days to set
|
|
#
|
public
|
isEmpty(): bool
Returns true if the interval is empty for each unit.
Returns true if the interval is empty for each unit.
|
#
|
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
|
__call(string $method, array $parameters): static
Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day().
Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day().
Note: This is done using the magic method to allow static and instance methods to
have the same names.
Parameters
$method |
magic method name called
|
$parameters |
parameters list
|
Throws
|
#
|
public
|
toArray(): int[]
Returns interval values as an array where key are the unit names and values the counts.
Returns interval values as an array where key are the unit names and values the counts.
|
#
|
public
|
getNonZeroValues(): int[]
Returns interval non-zero values as an array where key are the unit names and values the counts.
Returns interval non-zero values as an array where key are the unit names and values the counts.
|
#
|
public
|
getValuesSequence(): int[]
Returns interval values as an array where key are the unit names and values the counts
from the biggest non-zero one…
Returns interval values as an array where key are the unit names and values the counts
from the biggest non-zero one the the smallest non-zero one.
|
#
|
public
|
forHumans(int|array $syntax = null, bool $short = false, int $parts = -1, int $options = null): string
Get the current interval in a human readable format in the current locale.
Get the current interval in a human readable format in the current locale.
Parameters
$syntax |
if array passed, parameters will be extracted from it, the array may contains:
- 'syntax' entry (see below)
- 'short' entry (see below)
- 'parts' entry (see below)
- 'options' entry (see below)
- 'skip' entry, list of units to skip (array of strings or a single string,
it can be the unit name (singular or plural) or its shortcut (y, m, w, d, h, min, s, ms, µs).
- 'aUnit' entry, prefer "an hour" over "1 hour" if true
- 'join' entry determines how to join multiple parts of the string
- if $join is a string, it's used as a joiner glue - if $join is a callable/closure, it get the list of string and should return a string
- if $join is an array, the first item will be the default glue, and the second item will be used instead of the glue for the last item
- if $join is true, it will be guessed from the locale ('list' translation file entry) - if $join is missing, a space will be used as glue
- 'minimumUnit' entry determines the smallest unit of time to display can be long or
` short form of the units, e.g. 'hour' or 'h' (default value: s)
if int passed, it add modifiers:
Possible values:
- CarbonInterface::DIFF_ABSOLUTE no modifiers
- CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier
- CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier
Default value: CarbonInterface::DIFF_ABSOLUTE
|
$short |
displays short format of time units
|
$parts |
maximum number of parts to display (default value: -1: no limits)
|
$options |
human diff options
|
Throws
|
#
|
public
|
__toString(): string
Format the instance as a string using the forHumans() function.
Format the instance as a string using the forHumans() function.
Throws
|
#
|
public
|
toDateInterval(): DateInterval
Return native DateInterval PHP object matching the current instance.
Return native DateInterval PHP object matching the current instance.
|
#
|
public
|
toPeriod(DateTimeInterface|string|int ...$params): CarbonPeriod
Convert the interval to a CarbonPeriod.
Convert the interval to a CarbonPeriod.
Parameters
...$params |
Start date, [end date or recurrences] and optional settings.
|
|
#
|
public
|
invert(bool|int $inverted = null): $this
Invert the interval.
Parameters
$inverted |
if a parameter is passed, the passed value cast as 1 or 0 is used
as the new value of the ->invert property.
|
|
#
|
public
|
add(string|DateInterval $unit, int|float $value = 1): $this
Add the passed interval to the current instance.
Add the passed interval to the current instance.
|
#
|
public
|
sub(string|DateInterval $unit, int|float $value = 1): $this
Subtract the passed interval to the current instance.
Subtract the passed interval to the current instance.
|
#
|
public
|
subtract(string|DateInterval $unit, int|float $value = 1): $this
Subtract the passed interval to the current instance.
Subtract the passed interval to the current instance.
|
#
|
public
|
plus(
int $years = 0,
int $months = 0,
int|float $weeks = 0,
int|float $days = 0,
int|float $hours = 0,
int|float $minutes = 0,
int|float $seconds = 0,
int|float $microseconds = 0,
): $this
Add given parameters to the current interval.
Add given parameters to the current interval.
|
#
|
public
|
minus(
int $years = 0,
int $months = 0,
int|float $weeks = 0,
int|float $days = 0,
int|float $hours = 0,
int|float $minutes = 0,
int|float $seconds = 0,
int|float $microseconds = 0,
): $this
Add given parameters to the current interval.
Add given parameters to the current interval.
|
#
|
public
|
times(float|int $factor): $this
Multiply current instance given number of times. times() is naive, it multiplies each unit
(so day can be greater than…
Multiply current instance given number of times. times() is naive, it multiplies each unit
(so day can be greater than 31, hour can be greater than 23, etc.) and the result is rounded
separately for each unit.
Use times() when you want a fast and approximated calculation that does not cascade units.
For a precise and cascaded calculation,
|
#
|
public
|
shares(float|int $divider): $this
Divide current instance by a given divider. shares() is naive, it divides each unit separately
and the result is…
Divide current instance by a given divider. shares() is naive, it divides each unit separately
and the result is rounded for each unit. So 5 hours and 20 minutes shared by 3 becomes 2 hours
and 7 minutes.
Use shares() when you want a fast and approximated calculation that does not cascade units.
For a precise and cascaded calculation,
|
#
|
public
|
multiply(float|int $factor): $this
Multiply and cascade current instance by a given factor.
Multiply and cascade current instance by a given factor.
|
#
|
public
|
divide(float|int $divider): $this
Divide and cascade current instance by a given divider.
Divide and cascade current instance by a given divider.
|
#
|
public
static
|
getDateIntervalSpec(DateInterval $interval, bool $microseconds = false, array $skip = []): string
Get the interval_spec string of a date interval.
Get the interval_spec string of a date interval.
|
#
|
public
|
spec(bool $microseconds = false): string
Get the interval_spec string.
Get the interval_spec string.
|
#
|
public
static
|
compareDateIntervals(DateInterval $first, DateInterval $second): int
Comparing 2 date intervals.
Comparing 2 date intervals.
|
#
|
public
|
compare(DateInterval $interval): int
Comparing with passed interval.
Comparing with passed interval.
|
#
|
public
|
cascade(): $this
Convert overflowed values into bigger units.
Convert overflowed values into bigger units.
|
#
|
public
|
hasNegativeValues(): bool
|
#
|
public
|
hasPositiveValues(): bool
|
#
|
public
|
total(string $unit): float
Get amount of given unit equivalent to the interval.
Get amount of given unit equivalent to the interval.
Throws
|
#
|
public
|
eq(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is equal to another
Determines if the instance is equal to another
|
#
|
public
|
equalTo(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is equal to another
Determines if the instance is equal to another
|
#
|
public
|
ne(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is not equal to another
Determines if the instance is not equal to another
|
#
|
public
|
notEqualTo(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is not equal to another
Determines if the instance is not equal to another
|
#
|
public
|
gt(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is greater (longer) than another
Determines if the instance is greater (longer) than another
|
#
|
public
|
greaterThan(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is greater (longer) than another
Determines if the instance is greater (longer) than another
|
#
|
public
|
gte(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is greater (longer) than or equal to another
Determines if the instance is greater (longer) than or equal to another
|
#
|
public
|
greaterThanOrEqualTo(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is greater (longer) than or equal to another
Determines if the instance is greater (longer) than or equal to another
|
#
|
public
|
lt(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is less (shorter) than another
Determines if the instance is less (shorter) than another
|
#
|
public
|
lessThan(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is less (shorter) than another
Determines if the instance is less (shorter) than another
|
#
|
public
|
lte(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is less (shorter) than or equal to another
Determines if the instance is less (shorter) than or equal to another
|
#
|
public
|
lessThanOrEqualTo(CarbonInterval|DateInterval|mixed $interval): bool
Determines if the instance is less (shorter) than or equal to another
Determines if the instance is less (shorter) than or equal to another
|
#
|
public
|
between(
CarbonInterval|DateInterval|mixed $interval1,
CarbonInterval|DateInterval|mixed $interval2,
bool $equal = true,
): bool
Determines if the instance is between two others.
Determines if the instance is between two others.
The third argument allow you to specify if bounds are included or not (true by default)
but for when you including/excluding bounds may produce different results in your application,
we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead.
Parameters
$equal |
Indicates if an equal to comparison should be done
|
|
#
|
public
|
betweenIncluded(CarbonInterval|DateInterval|mixed $interval1, CarbonInterval|DateInterval|mixed $interval2): bool
Determines if the instance is between two others, bounds excluded.
Determines if the instance is between two others, bounds excluded.
|
#
|
public
|
betweenExcluded(CarbonInterval|DateInterval|mixed $interval1, CarbonInterval|DateInterval|mixed $interval2): bool
Determines if the instance is between two others, bounds excluded.
Determines if the instance is between two others, bounds excluded.
|
#
|
public
|
isBetween(
CarbonInterval|DateInterval|mixed $interval1,
CarbonInterval|DateInterval|mixed $interval2,
bool $equal = true,
): bool
Determines if the instance is between two others
Determines if the instance is between two others
Parameters
$equal |
Indicates if an equal to comparison should be done
|
|
#
|
public
|
roundUnit(string $unit, float|int|string|DateInterval|null $precision = 1, string $function = 'round'): $this
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.
Throws
|
#
|
public
|
floorUnit(string $unit, float|int|string|DateInterval|null $precision = 1): $this
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.
Throws
|
#
|
public
|
ceilUnit(string $unit, float|int|string|DateInterval|null $precision = 1): $this
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.
Throws
|
#
|
public
|
round(float|int|string|DateInterval|null $precision = 1, string $function = 'round'): $this
Round the current instance second with given precision if specified.
Round the current instance second with given precision if specified.
Throws
|
#
|
public
|
floor(float|int|string|DateInterval|null $precision = 1): $this
Round the current instance second with given precision if specified.
Round the current instance second with given precision if specified.
Throws
|
#
|
public
|
ceil(float|int|string|DateInterval|null $precision = 1): $this
Ceil the current instance second with given precision if specified.
Ceil the current instance second with given precision if specified.
Throws
|
#
|
public
static
|
years($years = 1): CarbonInterval
Create instance specifying a number of years or modify the number of years if called on an instance.
Create instance specifying a number of years or modify the number of years if called on an instance.
|
#
|
public
static
|
year($years = 1): CarbonInterval
Alias for years()
|
#
|
public
static
|
months($months = 1): CarbonInterval
Create instance specifying a number of months or modify the number of months if called on an instance.
Create instance specifying a number of months or modify the number of months if called on an instance.
|
#
|
public
static
|
month($months = 1): CarbonInterval
Alias for months()
|
#
|
public
static
|
weeks($weeks = 1): CarbonInterval
Create instance specifying a number of weeks or modify the number of weeks if called on an instance.
Create instance specifying a number of weeks or modify the number of weeks if called on an instance.
|
#
|
public
static
|
week($weeks = 1): CarbonInterval
Alias for weeks()
|
#
|
public
static
|
days($days = 1): CarbonInterval
Create instance specifying a number of days or modify the number of days if called on an instance.
Create instance specifying a number of days or modify the number of days if called on an instance.
|
#
|
public
static
|
dayz($days = 1): CarbonInterval
Alias for days()
|
#
|
public
static
|
daysExcludeWeeks($days = 1): CarbonInterval
Create instance specifying a number of days or modify the number of days (keeping the current number of weeks) if…
Create instance specifying a number of days or modify the number of days (keeping the current number of weeks) if called on an instance.
|
#
|
public
static
|
dayzExcludeWeeks($days = 1): CarbonInterval
Alias for daysExcludeWeeks()
Alias for daysExcludeWeeks()
|
#
|
public
static
|
day($days = 1): CarbonInterval
Alias for days()
|
#
|
public
static
|
hours($hours = 1): CarbonInterval
Create instance specifying a number of hours or modify the number of hours if called on an instance.
Create instance specifying a number of hours or modify the number of hours if called on an instance.
|
#
|
public
static
|
hour($hours = 1): CarbonInterval
Alias for hours()
|
#
|
public
static
|
minutes($minutes = 1): CarbonInterval
Create instance specifying a number of minutes or modify the number of minutes if called on an instance.
Create instance specifying a number of minutes or modify the number of minutes if called on an instance.
|
#
|
public
static
|
minute($minutes = 1): CarbonInterval
Alias for minutes()
|
#
|
public
static
|
seconds($seconds = 1): CarbonInterval
Create instance specifying a number of seconds or modify the number of seconds if called on an instance.
Create instance specifying a number of seconds or modify the number of seconds if called on an instance.
|
#
|
public
static
|
second($seconds = 1): CarbonInterval
Alias for seconds()
|
#
|
public
static
|
milliseconds($milliseconds = 1): CarbonInterval
Create instance specifying a number of milliseconds or modify the number of milliseconds if called on an instance.
Create instance specifying a number of milliseconds or modify the number of milliseconds if called on an instance.
|
#
|
public
static
|
millisecond($milliseconds = 1): CarbonInterval
Alias for milliseconds()
|
#
|
public
static
|
microseconds($microseconds = 1): CarbonInterval
Create instance specifying a number of microseconds or modify the number of microseconds if called on an instance.
Create instance specifying a number of microseconds or modify the number of microseconds if called on an instance.
|
#
|
public
static
|
microsecond($microseconds = 1): CarbonInterval
Alias for microseconds()
|
#
|
public
|
addYears(int $years): $this
Add given number of years to the current interval
Add given number of years to the current interval
|
#
|
public
|
subYears(int $years): $this
Subtract given number of years to the current interval
Subtract given number of years to the current interval
|
#
|
public
|
addMonths(int $months): $this
Add given number of months to the current interval
Add given number of months to the current interval
|
#
|
public
|
subMonths(int $months): $this
Subtract given number of months to the current interval
Subtract given number of months to the current interval
|
#
|
public
|
addWeeks(int|float $weeks): $this
Add given number of weeks to the current interval
Add given number of weeks to the current interval
|
#
|
public
|
subWeeks(int|float $weeks): $this
Subtract given number of weeks to the current interval
Subtract given number of weeks to the current interval
|
#
|
public
|
addDays(int|float $days): $this
Add given number of days to the current interval
Add given number of days to the current interval
|
#
|
public
|
subDays(int|float $days): $this
Subtract given number of days to the current interval
Subtract given number of days to the current interval
|
#
|
public
|
addHours(int|float $hours): $this
Add given number of hours to the current interval
Add given number of hours to the current interval
|
#
|
public
|
subHours(int|float $hours): $this
Subtract given number of hours to the current interval
Subtract given number of hours to the current interval
|
#
|
public
|
addMinutes(int|float $minutes): $this
Add given number of minutes to the current interval
Add given number of minutes to the current interval
|
#
|
public
|
subMinutes(int|float $minutes): $this
Subtract given number of minutes to the current interval
Subtract given number of minutes to the current interval
|
#
|
public
|
addSeconds(int|float $seconds): $this
Add given number of seconds to the current interval
Add given number of seconds to the current interval
|
#
|
public
|
subSeconds(int|float $seconds): $this
Subtract given number of seconds to the current interval
Subtract given number of seconds to the current interval
|
#
|
public
|
addMilliseconds(int|float $milliseconds): $this
Add given number of milliseconds to the current interval
Add given number of milliseconds to the current interval
|
#
|
public
|
subMilliseconds(int|float $milliseconds): $this
Subtract given number of milliseconds to the current interval
Subtract given number of milliseconds to the current interval
|
#
|
public
|
addMicroseconds(int|float $microseconds): $this
Add given number of microseconds to the current interval
Add given number of microseconds to the current interval
|
#
|
public
|
subMicroseconds(int|float $microseconds): $this
Subtract given number of microseconds to the current interval
Subtract given number of microseconds to the current interval
|
#
|
public
|
roundYear(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance year with given precision.
Truncate the current instance year with given precision.
|
#
|
public
|
floorYears(int|float $precision = 1): $this
Truncate the current instance year with given precision.
Truncate the current instance year with given precision.
|
#
|
public
|
ceilYear(int|float $precision = 1): $this
Ceil the current instance year with given precision.
Ceil the current instance year with given precision.
|
#
|
public
|
ceilYears(int|float $precision = 1): $this
Ceil the current instance year with given precision.
Ceil the current instance year with given precision.
|
#
|
public
|
roundMonth(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance month with given precision.
Truncate the current instance month with given precision.
|
#
|
public
|
floorMonths(int|float $precision = 1): $this
Truncate the current instance month with given precision.
Truncate the current instance month with given precision.
|
#
|
public
|
ceilMonth(int|float $precision = 1): $this
Ceil the current instance month with given precision.
Ceil the current instance month with given precision.
|
#
|
public
|
ceilMonths(int|float $precision = 1): $this
Ceil the current instance month with given precision.
Ceil the current instance month with given precision.
|
#
|
public
|
roundWeek(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance day with given precision.
Truncate the current instance day with given precision.
|
#
|
public
|
floorWeeks(int|float $precision = 1): $this
Truncate the current instance day with given precision.
Truncate the current instance day with given precision.
|
#
|
public
|
ceilWeek(int|float $precision = 1): $this
Ceil the current instance day with given precision.
Ceil the current instance day with given precision.
|
#
|
public
|
ceilWeeks(int|float $precision = 1): $this
Ceil the current instance day with given precision.
Ceil the current instance day with given precision.
|
#
|
public
|
roundDay(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance day with given precision.
Truncate the current instance day with given precision.
|
#
|
public
|
floorDays(int|float $precision = 1): $this
Truncate the current instance day with given precision.
Truncate the current instance day with given precision.
|
#
|
public
|
ceilDay(int|float $precision = 1): $this
Ceil the current instance day with given precision.
Ceil the current instance day with given precision.
|
#
|
public
|
ceilDays(int|float $precision = 1): $this
Ceil the current instance day with given precision.
Ceil the current instance day with given precision.
|
#
|
public
|
roundHour(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance hour with given precision.
Truncate the current instance hour with given precision.
|
#
|
public
|
floorHours(int|float $precision = 1): $this
Truncate the current instance hour with given precision.
Truncate the current instance hour with given precision.
|
#
|
public
|
ceilHour(int|float $precision = 1): $this
Ceil the current instance hour with given precision.
Ceil the current instance hour with given precision.
|
#
|
public
|
ceilHours(int|float $precision = 1): $this
Ceil the current instance hour with given precision.
Ceil the current instance hour with given precision.
|
#
|
public
|
roundMinute(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance minute with given precision.
Truncate the current instance minute with given precision.
|
#
|
public
|
floorMinutes(int|float $precision = 1): $this
Truncate the current instance minute with given precision.
Truncate the current instance minute with given precision.
|
#
|
public
|
ceilMinute(int|float $precision = 1): $this
Ceil the current instance minute with given precision.
Ceil the current instance minute with given precision.
|
#
|
public
|
ceilMinutes(int|float $precision = 1): $this
Ceil the current instance minute with given precision.
Ceil the current instance minute with given precision.
|
#
|
public
|
roundSecond(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance second with given precision.
Truncate the current instance second with given precision.
|
#
|
public
|
floorSeconds(int|float $precision = 1): $this
Truncate the current instance second with given precision.
Truncate the current instance second with given precision.
|
#
|
public
|
ceilSecond(int|float $precision = 1): $this
Ceil the current instance second with given precision.
Ceil the current instance second with given precision.
|
#
|
public
|
ceilSeconds(int|float $precision = 1): $this
Ceil the current instance second with given precision.
Ceil the current instance second with given precision.
|
#
|
public
|
roundMillennium(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance millennium with given precision.
Truncate the current instance millennium with given precision.
|
#
|
public
|
floorMillennia(int|float $precision = 1): $this
Truncate the current instance millennium with given precision.
Truncate the current instance millennium with given precision.
|
#
|
public
|
ceilMillennium(int|float $precision = 1): $this
Ceil the current instance millennium with given precision.
Ceil the current instance millennium with given precision.
|
#
|
public
|
ceilMillennia(int|float $precision = 1): $this
Ceil the current instance millennium with given precision.
Ceil the current instance millennium with given precision.
|
#
|
public
|
roundCentury(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance century with given precision.
Truncate the current instance century with given precision.
|
#
|
public
|
floorCenturies(int|float $precision = 1): $this
Truncate the current instance century with given precision.
Truncate the current instance century with given precision.
|
#
|
public
|
ceilCentury(int|float $precision = 1): $this
Ceil the current instance century with given precision.
Ceil the current instance century with given precision.
|
#
|
public
|
ceilCenturies(int|float $precision = 1): $this
Ceil the current instance century with given precision.
Ceil the current instance century with given precision.
|
#
|
public
|
roundDecade(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance decade with given precision.
Truncate the current instance decade with given precision.
|
#
|
public
|
floorDecades(int|float $precision = 1): $this
Truncate the current instance decade with given precision.
Truncate the current instance decade with given precision.
|
#
|
public
|
ceilDecade(int|float $precision = 1): $this
Ceil the current instance decade with given precision.
Ceil the current instance decade with given precision.
|
#
|
public
|
ceilDecades(int|float $precision = 1): $this
Ceil the current instance decade with given precision.
Ceil the current instance decade with given precision.
|
#
|
public
|
roundQuarter(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance quarter with given precision.
Truncate the current instance quarter with given precision.
|
#
|
public
|
floorQuarters(int|float $precision = 1): $this
Truncate the current instance quarter with given precision.
Truncate the current instance quarter with given precision.
|
#
|
public
|
ceilQuarter(int|float $precision = 1): $this
Ceil the current instance quarter with given precision.
Ceil the current instance quarter with given precision.
|
#
|
public
|
ceilQuarters(int|float $precision = 1): $this
Ceil the current instance quarter with given precision.
Ceil the current instance quarter with given precision.
|
#
|
public
|
roundMillisecond(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance millisecond with given precision.
Truncate the current instance millisecond with given precision.
|
#
|
public
|
floorMilliseconds(int|float $precision = 1): $this
Truncate the current instance millisecond with given precision.
Truncate the current instance millisecond with given precision.
|
#
|
public
|
ceilMillisecond(int|float $precision = 1): $this
Ceil the current instance millisecond with given precision.
Ceil the current instance millisecond with given precision.
|
#
|
public
|
ceilMilliseconds(int|float $precision = 1): $this
Ceil the current instance millisecond with given precision.
Ceil the current instance millisecond with given precision.
|
#
|
public
|
roundMicrosecond(int|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(int|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(int|float $precision = 1): $this
Truncate the current instance microsecond with given precision.
Truncate the current instance microsecond with given precision.
|
#
|
public
|
floorMicroseconds(int|float $precision = 1): $this
Truncate the current instance microsecond with given precision.
Truncate the current instance microsecond with given precision.
|
#
|
public
|
ceilMicrosecond(int|float $precision = 1): $this
Ceil the current instance microsecond with given precision.
Ceil the current instance microsecond with given precision.
|
#
|
public
|
ceilMicroseconds(int|float $precision = 1): $this
Ceil the current instance microsecond with given precision.
Ceil the current instance microsecond with given precision.
|
#
|