PK S Zb b readme.mdnu [ # Carbon
[](https://packagist.org/packages/nesbot/carbon)
[](https://packagist.org/packages/nesbot/carbon)
[](https://actions-badge.atrox.dev/briannesbitt/Carbon/goto)
[](https://codecov.io/github/briannesbitt/Carbon?branch=master)
[](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme)
An international PHP extension for DateTime. [https://carbon.nesbot.com](https://carbon.nesbot.com)
```php
toDateTimeString());
printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString()
$tomorrow = Carbon::now()->addDay();
$lastWeek = Carbon::now()->subWeek();
$nextSummerOlympics = Carbon::createFromDate(2016)->addYears(4);
$officialDate = Carbon::now()->toRfc2822String();
$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age;
$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London');
$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT');
// Don't really want this to happen so mock now
Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1));
// comparisons are always done in UTC
if (Carbon::now()->gte($internetWillBlowUpOn)) {
die();
}
// Phew! Return to normal behaviour
Carbon::setTestNow();
if (Carbon::now()->isWeekend()) {
echo 'Party!';
}
// Over 200 languages (and over 500 regional variants) supported:
echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago'
echo Carbon::now()->subMinutes(2)->locale('zh_CN')->diffForHumans(); // '2分钟前'
echo Carbon::parse('2019-07-23 14:51')->isoFormat('LLLL'); // 'Tuesday, July 23, 2019 2:51 PM'
echo Carbon::parse('2019-07-23 14:51')->locale('fr_FR')->isoFormat('LLLL'); // 'mardi 23 juillet 2019 14:51'
// ... but also does 'from now', 'after' and 'before'
// rolling up to seconds, minutes, hours, days, months, years
$daysSinceEpoch = Carbon::createFromTimestamp(0)->diffInDays();
```
[Get supported nesbot/carbon with the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme)
## Installation
### With Composer
```
$ composer require nesbot/carbon
```
```json
{
"require": {
"nesbot/carbon": "^2.16"
}
}
```
```php
### Translators
[Thanks to people helping us to translate Carbon in so many languages](https://carbon.nesbot.com/contribute/translators/)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
[[Become a sponsor](https://opencollective.com/Carbon#sponsor)]
### Backers
Thank you to all our backers! 🙏
[[Become a backer](https://opencollective.com/Carbon#backer)]
## Carbon for enterprise
Available as part of the Tidelift Subscription.
The maintainers of ``Carbon`` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
PK S Z$ɇ
bin/carbonnu [ #!/usr/bin/env php
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Symfony\Component\Translation\MessageCatalogueInterface;
if (!class_exists(LazyTranslator::class, false)) {
class LazyTranslator extends AbstractTranslator implements TranslatorStrongTypeInterface
{
public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
return $this->translate($id, $parameters, $domain, $locale);
}
public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages')
{
$messages = $this->getPrivateProperty($catalogue, 'messages');
if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) {
return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id];
}
if (isset($messages[$domain][$id])) {
return $messages[$domain][$id];
}
$fallbackCatalogue = $this->getPrivateProperty($catalogue, 'fallbackCatalogue');
if ($fallbackCatalogue !== null) {
return $this->getFromCatalogue($fallbackCatalogue, $id, $domain);
}
return $id;
}
private function getPrivateProperty($instance, string $field)
{
return (function (string $field) {
return $this->$field;
})->call($instance, $field);
}
}
}
PK S Zs\r r ? lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\MessageFormatter;
use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
if (!class_exists(LazyMessageFormatter::class, false)) {
abstract class LazyMessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface
{
abstract protected function transformLocale(?string $locale): ?string;
public function format($message, $locale, array $parameters = [])
{
return $this->formatter->format(
$message,
$this->transformLocale($locale),
$parameters
);
}
public function choiceFormat($message, $number, $locale, array $parameters = [])
{
return $this->formatter->choiceFormat($message, $number, $locale, $parameters);
}
}
}
PK S Z4 A lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\MessageFormatter;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
if (!class_exists(LazyMessageFormatter::class, false)) {
abstract class LazyMessageFormatter implements MessageFormatterInterface
{
public function format(string $message, string $locale, array $parameters = []): string
{
return $this->formatter->format(
$message,
$this->transformLocale($locale),
$parameters
);
}
}
}
PK S Z8Q- - " lazy/Carbon/TranslatorWeakType.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
if (!class_exists(LazyTranslator::class, false)) {
class LazyTranslator extends AbstractTranslator
{
/**
* Returns the translation.
*
* @param string|null $id
* @param array $parameters
* @param string|null $domain
* @param string|null $locale
*
* @return string
*/
public function trans($id, array $parameters = [], $domain = null, $locale = null)
{
return $this->translate($id, $parameters, $domain, $locale);
}
}
}
PK S Z9. , lazy/Carbon/PHPStan/AbstractMacroBuiltin.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\PHPStan;
use PHPStan\BetterReflection\Reflection;
use ReflectionMethod;
if (!class_exists(AbstractReflectionMacro::class, false)) {
abstract class AbstractReflectionMacro extends AbstractMacro
{
/**
* {@inheritdoc}
*/
public function getReflection(): ?ReflectionMethod
{
if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) {
return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction);
}
return $this->reflectionFunction instanceof ReflectionMethod
? $this->reflectionFunction
: null;
}
}
}
PK S Z l l + lazy/Carbon/PHPStan/AbstractMacroStatic.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\PHPStan;
use PHPStan\BetterReflection\Reflection;
use ReflectionMethod;
if (!class_exists(AbstractReflectionMacro::class, false)) {
abstract class AbstractReflectionMacro extends AbstractMacro
{
/**
* {@inheritdoc}
*/
public function getReflection(): ?Reflection\Adapter\ReflectionMethod
{
if ($this->reflectionFunction instanceof Reflection\Adapter\ReflectionMethod) {
return $this->reflectionFunction;
}
if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) {
return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction);
}
return $this->reflectionFunction instanceof ReflectionMethod
? new Reflection\Adapter\ReflectionMethod(
Reflection\ReflectionMethod::createFromName(
$this->reflectionFunction->getDeclaringClass()->getName(),
$this->reflectionFunction->getName()
)
)
: null;
}
}
}
PK S Zk6V V % lazy/Carbon/PHPStan/MacroWeakType.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\PHPStan;
if (!class_exists(LazyMacro::class, false)) {
abstract class LazyMacro extends AbstractReflectionMacro
{
/**
* {@inheritdoc}
*
* @return string|false
*/
public function getFileName()
{
$file = $this->reflectionFunction->getFileName();
return (($file ? realpath($file) : null) ?: $file) ?: null;
}
/**
* {@inheritdoc}
*
* @return int|false
*/
public function getStartLine()
{
return $this->reflectionFunction->getStartLine();
}
/**
* {@inheritdoc}
*
* @return int|false
*/
public function getEndLine()
{
return $this->reflectionFunction->getEndLine();
}
}
}
PK S ZDJ ' lazy/Carbon/PHPStan/MacroStrongType.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\PHPStan;
if (!class_exists(LazyMacro::class, false)) {
abstract class LazyMacro extends AbstractReflectionMacro
{
/**
* {@inheritdoc}
*/
public function getFileName(): ?string
{
$file = $this->reflectionFunction->getFileName();
return (($file ? realpath($file) : null) ?: $file) ?: null;
}
/**
* {@inheritdoc}
*/
public function getStartLine(): ?int
{
return $this->reflectionFunction->getStartLine();
}
/**
* {@inheritdoc}
*/
public function getEndLine(): ?int
{
return $this->reflectionFunction->getEndLine();
}
}
}
PK S Z:bo o src/Carbon/Carbon.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\Traits\Date;
use Carbon\Traits\DeprecatedProperties;
use DateTime;
use DateTimeInterface;
use DateTimeZone;
/**
* A simple API extension for DateTime.
*
* @mixin DeprecatedProperties
*
*
*
* @property int $year
* @property int $yearIso
* @property int $month
* @property int $day
* @property int $hour
* @property int $minute
* @property int $second
* @property int $micro
* @property int $microsecond
* @property int|float|string $timestamp seconds since the Unix Epoch
* @property string $englishDayOfWeek the day of week in English
* @property string $shortEnglishDayOfWeek the abbreviated day of week in English
* @property string $englishMonth the month in English
* @property string $shortEnglishMonth the abbreviated month in English
* @property int $milliseconds
* @property int $millisecond
* @property int $milli
* @property int $week 1 through 53
* @property int $isoWeek 1 through 53
* @property int $weekYear year according to week format
* @property int $isoWeekYear year according to ISO week format
* @property int $dayOfYear 1 through 366
* @property int $age does a diffInYears() with default parameters
* @property int $offset the timezone offset in seconds from UTC
* @property int $offsetMinutes the timezone offset in minutes from UTC
* @property int $offsetHours the timezone offset in hours from UTC
* @property CarbonTimeZone $timezone the current timezone
* @property CarbonTimeZone $tz alias of $timezone
* @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday)
* @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday)
* @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday
* @property-read int $daysInMonth number of days in the given month
* @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark)
* @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark)
* @property-read string $timezoneAbbreviatedName the current timezone abbreviated name
* @property-read string $tzAbbrName alias of $timezoneAbbreviatedName
* @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read int $noZeroHour current hour from 1 to 24
* @property-read int $weeksInYear 51 through 53
* @property-read int $isoWeeksInYear 51 through 53
* @property-read int $weekOfMonth 1 through 5
* @property-read int $weekNumberInMonth 1 through 5
* @property-read int $firstWeekDay 0 through 6
* @property-read int $lastWeekDay 0 through 6
* @property-read int $daysInYear 365 or 366
* @property-read int $quarter the quarter of this instance, 1 - 4
* @property-read int $decade the decade of this instance
* @property-read int $century the century of this instance
* @property-read int $millennium the millennium of this instance
* @property-read bool $dst daylight savings time indicator, true if DST, false otherwise
* @property-read bool $local checks if the timezone is local, true if local, false otherwise
* @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise
* @property-read string $timezoneName the current timezone name
* @property-read string $tzName alias of $timezoneName
* @property-read string $locale locale of the current instance
*
* @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.)
* @method bool isLocal() Check if the current instance has non-UTC timezone.
* @method bool isValid() Check if the current instance is a valid date.
* @method bool isDST() Check if the current instance is in a daylight saving time.
* @method bool isSunday() Checks if the instance day is sunday.
* @method bool isMonday() Checks if the instance day is monday.
* @method bool isTuesday() Checks if the instance day is tuesday.
* @method bool isWednesday() Checks if the instance day is wednesday.
* @method bool isThursday() Checks if the instance day is thursday.
* @method bool isFriday() Checks if the instance day is friday.
* @method bool isSaturday() Checks if the instance day is saturday.
* @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentYear() Checks if the instance is in the same year as the current moment.
* @method bool isNextYear() Checks if the instance is in the same year as the current moment next year.
* @method bool isLastYear() Checks if the instance is in the same year as the current moment last year.
* @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment.
* @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week.
* @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week.
* @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentDay() Checks if the instance is in the same day as the current moment.
* @method bool isNextDay() Checks if the instance is in the same day as the current moment next day.
* @method bool isLastDay() Checks if the instance is in the same day as the current moment last day.
* @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment.
* @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour.
* @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour.
* @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment.
* @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute.
* @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute.
* @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment.
* @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second.
* @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second.
* @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment.
* @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond.
* @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond.
* @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment.
* @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond.
* @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond.
* @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment.
* @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month.
* @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month.
* @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment.
* @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter.
* @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter.
* @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment.
* @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade.
* @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade.
* @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment.
* @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century.
* @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century.
* @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment.
* @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium.
* @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium.
* @method $this years(int $value) Set current instance year to the given value.
* @method $this year(int $value) Set current instance year to the given value.
* @method $this setYears(int $value) Set current instance year to the given value.
* @method $this setYear(int $value) Set current instance year to the given value.
* @method $this months(int $value) Set current instance month to the given value.
* @method $this month(int $value) Set current instance month to the given value.
* @method $this setMonths(int $value) Set current instance month to the given value.
* @method $this setMonth(int $value) Set current instance month to the given value.
* @method $this days(int $value) Set current instance day to the given value.
* @method $this day(int $value) Set current instance day to the given value.
* @method $this setDays(int $value) Set current instance day to the given value.
* @method $this setDay(int $value) Set current instance day to the given value.
* @method $this hours(int $value) Set current instance hour to the given value.
* @method $this hour(int $value) Set current instance hour to the given value.
* @method $this setHours(int $value) Set current instance hour to the given value.
* @method $this setHour(int $value) Set current instance hour to the given value.
* @method $this minutes(int $value) Set current instance minute to the given value.
* @method $this minute(int $value) Set current instance minute to the given value.
* @method $this setMinutes(int $value) Set current instance minute to the given value.
* @method $this setMinute(int $value) Set current instance minute to the given value.
* @method $this seconds(int $value) Set current instance second to the given value.
* @method $this second(int $value) Set current instance second to the given value.
* @method $this setSeconds(int $value) Set current instance second to the given value.
* @method $this setSecond(int $value) Set current instance second to the given value.
* @method $this millis(int $value) Set current instance millisecond to the given value.
* @method $this milli(int $value) Set current instance millisecond to the given value.
* @method $this setMillis(int $value) Set current instance millisecond to the given value.
* @method $this setMilli(int $value) Set current instance millisecond to the given value.
* @method $this milliseconds(int $value) Set current instance millisecond to the given value.
* @method $this millisecond(int $value) Set current instance millisecond to the given value.
* @method $this setMilliseconds(int $value) Set current instance millisecond to the given value.
* @method $this setMillisecond(int $value) Set current instance millisecond to the given value.
* @method $this micros(int $value) Set current instance microsecond to the given value.
* @method $this micro(int $value) Set current instance microsecond to the given value.
* @method $this setMicros(int $value) Set current instance microsecond to the given value.
* @method $this setMicro(int $value) Set current instance microsecond to the given value.
* @method $this microseconds(int $value) Set current instance microsecond to the given value.
* @method $this microsecond(int $value) Set current instance microsecond to the given value.
* @method $this setMicroseconds(int $value) Set current instance microsecond to the given value.
* @method $this setMicrosecond(int $value) Set current instance microsecond to the given value.
* @method $this addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval).
* @method $this addYear() Add one year to the instance (using date interval).
* @method $this subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval).
* @method $this subYear() Sub one year to the instance (using date interval).
* @method $this addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed.
* @method $this subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed.
* @method $this addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval).
* @method $this addMonth() Add one month to the instance (using date interval).
* @method $this subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval).
* @method $this subMonth() Sub one month to the instance (using date interval).
* @method $this addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed.
* @method $this subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed.
* @method $this addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval).
* @method $this addDay() Add one day to the instance (using date interval).
* @method $this subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval).
* @method $this subDay() Sub one day to the instance (using date interval).
* @method $this addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval).
* @method $this addHour() Add one hour to the instance (using date interval).
* @method $this subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval).
* @method $this subHour() Sub one hour to the instance (using date interval).
* @method $this addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval).
* @method $this addMinute() Add one minute to the instance (using date interval).
* @method $this subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval).
* @method $this subMinute() Sub one minute to the instance (using date interval).
* @method $this addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval).
* @method $this addSecond() Add one second to the instance (using date interval).
* @method $this subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval).
* @method $this subSecond() Sub one second to the instance (using date interval).
* @method $this addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
* @method $this addMilli() Add one millisecond to the instance (using date interval).
* @method $this subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
* @method $this subMilli() Sub one millisecond to the instance (using date interval).
* @method $this addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
* @method $this addMillisecond() Add one millisecond to the instance (using date interval).
* @method $this subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
* @method $this subMillisecond() Sub one millisecond to the instance (using date interval).
* @method $this addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
* @method $this addMicro() Add one microsecond to the instance (using date interval).
* @method $this subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
* @method $this subMicro() Sub one microsecond to the instance (using date interval).
* @method $this addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
* @method $this addMicrosecond() Add one microsecond to the instance (using date interval).
* @method $this subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
* @method $this subMicrosecond() Sub one microsecond to the instance (using date interval).
* @method $this addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval).
* @method $this addMillennium() Add one millennium to the instance (using date interval).
* @method $this subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval).
* @method $this subMillennium() Sub one millennium to the instance (using date interval).
* @method $this addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed.
* @method $this subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed.
* @method $this addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval).
* @method $this addCentury() Add one century to the instance (using date interval).
* @method $this subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval).
* @method $this subCentury() Sub one century to the instance (using date interval).
* @method $this addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed.
* @method $this subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed.
* @method $this addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval).
* @method $this addDecade() Add one decade to the instance (using date interval).
* @method $this subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval).
* @method $this subDecade() Sub one decade to the instance (using date interval).
* @method $this addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed.
* @method $this subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed.
* @method $this addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval).
* @method $this addQuarter() Add one quarter to the instance (using date interval).
* @method $this subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval).
* @method $this subQuarter() Sub one quarter to the instance (using date interval).
* @method $this addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed.
* @method $this subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed.
* @method $this addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval).
* @method $this addWeek() Add one week to the instance (using date interval).
* @method $this subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval).
* @method $this subWeek() Sub one week to the instance (using date interval).
* @method $this addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval).
* @method $this addWeekday() Add one weekday to the instance (using date interval).
* @method $this subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval).
* @method $this subWeekday() Sub one weekday to the instance (using date interval).
* @method $this addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMicro() Add one microsecond to the instance (using timestamp).
* @method $this subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMicro() Sub one microsecond to the instance (using timestamp).
* @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
* @method $this addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMicrosecond() Add one microsecond to the instance (using timestamp).
* @method $this subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMicrosecond() Sub one microsecond to the instance (using timestamp).
* @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
* @method $this addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMilli() Add one millisecond to the instance (using timestamp).
* @method $this subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMilli() Sub one millisecond to the instance (using timestamp).
* @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
* @method $this addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMillisecond() Add one millisecond to the instance (using timestamp).
* @method $this subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMillisecond() Sub one millisecond to the instance (using timestamp).
* @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
* @method $this addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealSecond() Add one second to the instance (using timestamp).
* @method $this subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealSecond() Sub one second to the instance (using timestamp).
* @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given.
* @method $this addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMinute() Add one minute to the instance (using timestamp).
* @method $this subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMinute() Sub one minute to the instance (using timestamp).
* @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given.
* @method $this addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp).
* @method $this addRealHour() Add one hour to the instance (using timestamp).
* @method $this subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp).
* @method $this subRealHour() Sub one hour to the instance (using timestamp).
* @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given.
* @method $this addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp).
* @method $this addRealDay() Add one day to the instance (using timestamp).
* @method $this subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp).
* @method $this subRealDay() Sub one day to the instance (using timestamp).
* @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given.
* @method $this addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp).
* @method $this addRealWeek() Add one week to the instance (using timestamp).
* @method $this subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp).
* @method $this subRealWeek() Sub one week to the instance (using timestamp).
* @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given.
* @method $this addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMonth() Add one month to the instance (using timestamp).
* @method $this subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMonth() Sub one month to the instance (using timestamp).
* @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given.
* @method $this addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp).
* @method $this addRealQuarter() Add one quarter to the instance (using timestamp).
* @method $this subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp).
* @method $this subRealQuarter() Sub one quarter to the instance (using timestamp).
* @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given.
* @method $this addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp).
* @method $this addRealYear() Add one year to the instance (using timestamp).
* @method $this subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp).
* @method $this subRealYear() Sub one year to the instance (using timestamp).
* @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given.
* @method $this addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp).
* @method $this addRealDecade() Add one decade to the instance (using timestamp).
* @method $this subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp).
* @method $this subRealDecade() Sub one decade to the instance (using timestamp).
* @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given.
* @method $this addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp).
* @method $this addRealCentury() Add one century to the instance (using timestamp).
* @method $this subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp).
* @method $this subRealCentury() Sub one century to the instance (using timestamp).
* @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given.
* @method $this addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMillennium() Add one millennium to the instance (using timestamp).
* @method $this subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMillennium() Sub one millennium to the instance (using timestamp).
* @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given.
* @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
* @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
* @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision.
* @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision.
* @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision.
* @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision.
* @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
* @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
* @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision.
* @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision.
* @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision.
* @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision.
* @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
* @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
* @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision.
* @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision.
* @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision.
* @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision.
* @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
* @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
* @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision.
* @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision.
* @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision.
* @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision.
* @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
* @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
* @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision.
* @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision.
* @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision.
* @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision.
* @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
* @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
* @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision.
* @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision.
* @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision.
* @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision.
* @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
* @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
* @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision.
* @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision.
* @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision.
* @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision.
* @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
* @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
* @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision.
* @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision.
* @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision.
* @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision.
* @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
* @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
* @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision.
* @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision.
* @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision.
* @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision.
* @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
* @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
* @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision.
* @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision.
* @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision.
* @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision.
* @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
* @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
* @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision.
* @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision.
* @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision.
* @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision.
* @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
* @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
* @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision.
* @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision.
* @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision.
* @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision.
* @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method static static|false createFromFormat(string $format, string $time, string|DateTimeZone $timezone = null) Parse a string into a new Carbon object according to the specified format.
* @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php
*
*
*/
class Carbon extends DateTime implements CarbonInterface
{
use Date;
/**
* Returns true if the current class/instance is mutable.
*
* @return bool
*/
public static function isMutable()
{
return true;
}
}
PK S Z䪦 src/Carbon/Cli/Invoker.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Cli;
class Invoker
{
public const CLI_CLASS_NAME = 'Carbon\\Cli';
protected function runWithCli(string $className, array $parameters): bool
{
$cli = new $className();
return $cli(...$parameters);
}
public function __invoke(...$parameters): bool
{
if (class_exists(self::CLI_CLASS_NAME)) {
return $this->runWithCli(self::CLI_CLASS_NAME, $parameters);
}
$function = (($parameters[1] ?? '') === 'install' ? ($parameters[2] ?? null) : null) ?: 'shell_exec';
$function('composer require carbon-cli/carbon-cli --no-interaction');
echo 'Installation succeeded.';
return true;
}
}
PK S Z"|' ' , src/Carbon/TranslatorStrongTypeInterface.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Symfony\Component\Translation\MessageCatalogueInterface;
/**
* Mark translator using strong type from symfony/translation >= 6.
*/
interface TranslatorStrongTypeInterface
{
public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages');
}
PK S ZM~a" " src/Carbon/CarbonTimeZone.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\Exceptions\InvalidCastException;
use Carbon\Exceptions\InvalidTimeZoneException;
use DateTimeInterface;
use DateTimeZone;
use Throwable;
class CarbonTimeZone extends DateTimeZone
{
public function __construct($timezone = null)
{
parent::__construct(static::getDateTimeZoneNameFromMixed($timezone));
}
protected static function parseNumericTimezone($timezone)
{
if ($timezone <= -100 || $timezone >= 100) {
throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.');
}
return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00';
}
protected static function getDateTimeZoneNameFromMixed($timezone)
{
if ($timezone === null) {
return date_default_timezone_get();
}
if (\is_string($timezone)) {
$timezone = preg_replace('/^\s*([+-]\d+)(\d{2})\s*$/', '$1:$2', $timezone);
}
if (is_numeric($timezone)) {
return static::parseNumericTimezone($timezone);
}
return $timezone;
}
protected static function getDateTimeZoneFromName(&$name)
{
return @timezone_open($name = (string) static::getDateTimeZoneNameFromMixed($name));
}
/**
* Cast the current instance into the given class.
*
* @param string $className The $className::instance() method will be called to cast the current object.
*
* @return DateTimeZone
*/
public function cast(string $className)
{
if (!method_exists($className, 'instance')) {
if (is_a($className, DateTimeZone::class, true)) {
return new $className($this->getName());
}
throw new InvalidCastException("$className has not the instance() method needed to cast the date.");
}
return $className::instance($this);
}
/**
* Create a CarbonTimeZone from mixed input.
*
* @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it.
* @param DateTimeZone|string|int|null $objectDump dump of the object for error messages.
*
* @throws InvalidTimeZoneException
*
* @return false|static
*/
public static function instance($object = null, $objectDump = null)
{
$tz = $object;
if ($tz instanceof static) {
return $tz;
}
if ($tz === null) {
return new static();
}
if (!$tz instanceof DateTimeZone) {
$tz = static::getDateTimeZoneFromName($object);
}
if ($tz !== false) {
return new static($tz->getName());
}
if (Carbon::isStrictModeEnabled()) {
throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')');
}
return false;
}
/**
* Returns abbreviated name of the current timezone according to DST setting.
*
* @param bool $dst
*
* @return string
*/
public function getAbbreviatedName($dst = false)
{
$name = $this->getName();
foreach ($this->listAbbreviations() as $abbreviation => $zones) {
foreach ($zones as $zone) {
if ($zone['timezone_id'] === $name && $zone['dst'] == $dst) {
return $abbreviation;
}
}
}
return 'unknown';
}
/**
* @alias getAbbreviatedName
*
* Returns abbreviated name of the current timezone according to DST setting.
*
* @param bool $dst
*
* @return string
*/
public function getAbbr($dst = false)
{
return $this->getAbbreviatedName($dst);
}
/**
* Get the offset as string "sHH:MM" (such as "+00:00" or "-12:30").
*
* @param DateTimeInterface|null $date
*
* @return string
*/
public function toOffsetName(DateTimeInterface $date = null)
{
return static::getOffsetNameFromMinuteOffset(
$this->getOffset($date ?: Carbon::now($this)) / 60
);
}
/**
* Returns a new CarbonTimeZone object using the offset string instead of region string.
*
* @param DateTimeInterface|null $date
*
* @return CarbonTimeZone
*/
public function toOffsetTimeZone(DateTimeInterface $date = null)
{
return new static($this->toOffsetName($date));
}
/**
* Returns the first region string (such as "America/Toronto") that matches the current timezone or
* false if no match is found.
*
* @see timezone_name_from_abbr native PHP function.
*
* @param DateTimeInterface|null $date
* @param int $isDst
*
* @return string|false
*/
public function toRegionName(DateTimeInterface $date = null, $isDst = 1)
{
$name = $this->getName();
$firstChar = substr($name, 0, 1);
if ($firstChar !== '+' && $firstChar !== '-') {
return $name;
}
$date = $date ?: Carbon::now($this);
// Integer construction no longer supported since PHP 8
// @codeCoverageIgnoreStart
try {
$offset = @$this->getOffset($date) ?: 0;
} catch (Throwable $e) {
$offset = 0;
}
// @codeCoverageIgnoreEnd
$name = @timezone_name_from_abbr('', $offset, $isDst);
if ($name) {
return $name;
}
foreach (timezone_identifiers_list() as $timezone) {
if (Carbon::instance($date)->tz($timezone)->getOffset() === $offset) {
return $timezone;
}
}
return false;
}
/**
* Returns a new CarbonTimeZone object using the region string instead of offset string.
*
* @param DateTimeInterface|null $date
*
* @return CarbonTimeZone|false
*/
public function toRegionTimeZone(DateTimeInterface $date = null)
{
$tz = $this->toRegionName($date);
if ($tz !== false) {
return new static($tz);
}
if (Carbon::isStrictModeEnabled()) {
throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.');
}
return false;
}
/**
* Cast to string (get timezone name).
*
* @return string
*/
public function __toString()
{
return $this->getName();
}
/**
* Return the type number:
*
* Type 1; A UTC offset, such as -0300
* Type 2; A timezone abbreviation, such as GMT
* Type 3: A timezone identifier, such as Europe/London
*/
public function getType(): int
{
return preg_match('/"timezone_type";i:(\d)/', serialize($this), $match) ? (int) $match[1] : 3;
}
/**
* Create a CarbonTimeZone from mixed input.
*
* @param DateTimeZone|string|int|null $object
*
* @return false|static
*/
public static function create($object = null)
{
return static::instance($object);
}
/**
* Create a CarbonTimeZone from int/float hour offset.
*
* @param float $hourOffset number of hour of the timezone shift (can be decimal).
*
* @return false|static
*/
public static function createFromHourOffset(float $hourOffset)
{
return static::createFromMinuteOffset($hourOffset * Carbon::MINUTES_PER_HOUR);
}
/**
* Create a CarbonTimeZone from int/float minute offset.
*
* @param float $minuteOffset number of total minutes of the timezone shift.
*
* @return false|static
*/
public static function createFromMinuteOffset(float $minuteOffset)
{
return static::instance(static::getOffsetNameFromMinuteOffset($minuteOffset));
}
/**
* Convert a total minutes offset into a standardized timezone offset string.
*
* @param float $minutes number of total minutes of the timezone shift.
*
* @return string
*/
public static function getOffsetNameFromMinuteOffset(float $minutes): string
{
$minutes = round($minutes);
$unsignedMinutes = abs($minutes);
return ($minutes < 0 ? '-' : '+').
str_pad((string) floor($unsignedMinutes / 60), 2, '0', STR_PAD_LEFT).
':'.
str_pad((string) ($unsignedMinutes % 60), 2, '0', STR_PAD_LEFT);
}
}
PK S ZI& & src/Carbon/Translator.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use ReflectionMethod;
use Symfony\Component\Translation;
use Symfony\Contracts\Translation\TranslatorInterface;
$transMethod = new ReflectionMethod(
class_exists(TranslatorInterface::class)
? TranslatorInterface::class
: Translation\Translator::class,
'trans'
);
require $transMethod->hasReturnType()
? __DIR__.'/../../lazy/Carbon/TranslatorStrongType.php'
: __DIR__.'/../../lazy/Carbon/TranslatorWeakType.php';
class Translator extends LazyTranslator
{
// Proxy dynamically loaded LazyTranslator in a static way
}
PK S Zlóu u src/Carbon/CarbonImmutable.phpnu [
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\Traits\Date;
use Carbon\Traits\DeprecatedProperties;
use DateTimeImmutable;
use DateTimeInterface;
use DateTimeZone;
/**
* A simple API extension for DateTimeImmutable.
*
* @mixin DeprecatedProperties
*
*
*
* @property int $year
* @property int $yearIso
* @property int $month
* @property int $day
* @property int $hour
* @property int $minute
* @property int $second
* @property int $micro
* @property int $microsecond
* @property int|float|string $timestamp seconds since the Unix Epoch
* @property string $englishDayOfWeek the day of week in English
* @property string $shortEnglishDayOfWeek the abbreviated day of week in English
* @property string $englishMonth the month in English
* @property string $shortEnglishMonth the abbreviated month in English
* @property int $milliseconds
* @property int $millisecond
* @property int $milli
* @property int $week 1 through 53
* @property int $isoWeek 1 through 53
* @property int $weekYear year according to week format
* @property int $isoWeekYear year according to ISO week format
* @property int $dayOfYear 1 through 366
* @property int $age does a diffInYears() with default parameters
* @property int $offset the timezone offset in seconds from UTC
* @property int $offsetMinutes the timezone offset in minutes from UTC
* @property int $offsetHours the timezone offset in hours from UTC
* @property CarbonTimeZone $timezone the current timezone
* @property CarbonTimeZone $tz alias of $timezone
* @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday)
* @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday)
* @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday
* @property-read int $daysInMonth number of days in the given month
* @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark)
* @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark)
* @property-read string $timezoneAbbreviatedName the current timezone abbreviated name
* @property-read string $tzAbbrName alias of $timezoneAbbreviatedName
* @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read int $noZeroHour current hour from 1 to 24
* @property-read int $weeksInYear 51 through 53
* @property-read int $isoWeeksInYear 51 through 53
* @property-read int $weekOfMonth 1 through 5
* @property-read int $weekNumberInMonth 1 through 5
* @property-read int $firstWeekDay 0 through 6
* @property-read int $lastWeekDay 0 through 6
* @property-read int $daysInYear 365 or 366
* @property-read int $quarter the quarter of this instance, 1 - 4
* @property-read int $decade the decade of this instance
* @property-read int $century the century of this instance
* @property-read int $millennium the millennium of this instance
* @property-read bool $dst daylight savings time indicator, true if DST, false otherwise
* @property-read bool $local checks if the timezone is local, true if local, false otherwise
* @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise
* @property-read string $timezoneName the current timezone name
* @property-read string $tzName alias of $timezoneName
* @property-read string $locale locale of the current instance
*
* @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.)
* @method bool isLocal() Check if the current instance has non-UTC timezone.
* @method bool isValid() Check if the current instance is a valid date.
* @method bool isDST() Check if the current instance is in a daylight saving time.
* @method bool isSunday() Checks if the instance day is sunday.
* @method bool isMonday() Checks if the instance day is monday.
* @method bool isTuesday() Checks if the instance day is tuesday.
* @method bool isWednesday() Checks if the instance day is wednesday.
* @method bool isThursday() Checks if the instance day is thursday.
* @method bool isFriday() Checks if the instance day is friday.
* @method bool isSaturday() Checks if the instance day is saturday.
* @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentYear() Checks if the instance is in the same year as the current moment.
* @method bool isNextYear() Checks if the instance is in the same year as the current moment next year.
* @method bool isLastYear() Checks if the instance is in the same year as the current moment last year.
* @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment.
* @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week.
* @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week.
* @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentDay() Checks if the instance is in the same day as the current moment.
* @method bool isNextDay() Checks if the instance is in the same day as the current moment next day.
* @method bool isLastDay() Checks if the instance is in the same day as the current moment last day.
* @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment.
* @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour.
* @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour.
* @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment.
* @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute.
* @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute.
* @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment.
* @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second.
* @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second.
* @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment.
* @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond.
* @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond.
* @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment.
* @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond.
* @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond.
* @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment.
* @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month.
* @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month.
* @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment.
* @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter.
* @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter.
* @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment.
* @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade.
* @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade.
* @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment.
* @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century.
* @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century.
* @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment.
* @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium.
* @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium.
* @method CarbonImmutable years(int $value) Set current instance year to the given value.
* @method CarbonImmutable year(int $value) Set current instance year to the given value.
* @method CarbonImmutable setYears(int $value) Set current instance year to the given value.
* @method CarbonImmutable setYear(int $value) Set current instance year to the given value.
* @method CarbonImmutable months(int $value) Set current instance month to the given value.
* @method CarbonImmutable month(int $value) Set current instance month to the given value.
* @method CarbonImmutable setMonths(int $value) Set current instance month to the given value.
* @method CarbonImmutable setMonth(int $value) Set current instance month to the given value.
* @method CarbonImmutable days(int $value) Set current instance day to the given value.
* @method CarbonImmutable day(int $value) Set current instance day to the given value.
* @method CarbonImmutable setDays(int $value) Set current instance day to the given value.
* @method CarbonImmutable setDay(int $value) Set current instance day to the given value.
* @method CarbonImmutable hours(int $value) Set current instance hour to the given value.
* @method CarbonImmutable hour(int $value) Set current instance hour to the given value.
* @method CarbonImmutable setHours(int $value) Set current instance hour to the given value.
* @method CarbonImmutable setHour(int $value) Set current instance hour to the given value.
* @method CarbonImmutable minutes(int $value) Set current instance minute to the given value.
* @method CarbonImmutable minute(int $value) Set current instance minute to the given value.
* @method CarbonImmutable setMinutes(int $value) Set current instance minute to the given value.
* @method CarbonImmutable setMinute(int $value) Set current instance minute to the given value.
* @method CarbonImmutable seconds(int $value) Set current instance second to the given value.
* @method CarbonImmutable second(int $value) Set current instance second to the given value.
* @method CarbonImmutable setSeconds(int $value) Set current instance second to the given value.
* @method CarbonImmutable setSecond(int $value) Set current instance second to the given value.
* @method CarbonImmutable millis(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable milli(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable setMillis(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable setMilli(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable milliseconds(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable millisecond(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable setMilliseconds(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable setMillisecond(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable micros(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable micro(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable setMicros(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable setMicro(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable microseconds(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable microsecond(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable setMicroseconds(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable setMicrosecond(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addYear() Add one year to the instance (using date interval).
* @method CarbonImmutable subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subYear() Sub one year to the instance (using date interval).
* @method CarbonImmutable addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMonth() Add one month to the instance (using date interval).
* @method CarbonImmutable subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMonth() Sub one month to the instance (using date interval).
* @method CarbonImmutable addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addDay() Add one day to the instance (using date interval).
* @method CarbonImmutable subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subDay() Sub one day to the instance (using date interval).
* @method CarbonImmutable addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addHour() Add one hour to the instance (using date interval).
* @method CarbonImmutable subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subHour() Sub one hour to the instance (using date interval).
* @method CarbonImmutable addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMinute() Add one minute to the instance (using date interval).
* @method CarbonImmutable subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMinute() Sub one minute to the instance (using date interval).
* @method CarbonImmutable addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addSecond() Add one second to the instance (using date interval).
* @method CarbonImmutable subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subSecond() Sub one second to the instance (using date interval).
* @method CarbonImmutable addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMilli() Add one millisecond to the instance (using date interval).
* @method CarbonImmutable subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMilli() Sub one millisecond to the instance (using date interval).
* @method CarbonImmutable addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMillisecond() Add one millisecond to the instance (using date interval).
* @method CarbonImmutable subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMillisecond() Sub one millisecond to the instance (using date interval).
* @method CarbonImmutable addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMicro() Add one microsecond to the instance (using date interval).
* @method CarbonImmutable subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMicro() Sub one microsecond to the instance (using date interval).
* @method CarbonImmutable addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMicrosecond() Add one microsecond to the instance (using date interval).
* @method CarbonImmutable subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMicrosecond() Sub one microsecond to the instance (using date interval).
* @method CarbonImmutable addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMillennium() Add one millennium to the instance (using date interval).
* @method CarbonImmutable subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMillennium() Sub one millennium to the instance (using date interval).
* @method CarbonImmutable addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addCentury() Add one century to the instance (using date interval).
* @method CarbonImmutable subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subCentury() Sub one century to the instance (using date interval).
* @method CarbonImmutable addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addDecade() Add one decade to the instance (using date interval).
* @method CarbonImmutable subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subDecade() Sub one decade to the instance (using date interval).
* @method CarbonImmutable addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addQuarter() Add one quarter to the instance (using date interval).
* @method CarbonImmutable subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subQuarter() Sub one quarter to the instance (using date interval).
* @method CarbonImmutable addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addWeek() Add one week to the instance (using date interval).
* @method CarbonImmutable subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subWeek() Sub one week to the instance (using date interval).
* @method CarbonImmutable addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addWeekday() Add one weekday to the instance (using date interval).
* @method CarbonImmutable subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subWeekday() Sub one weekday to the instance (using date interval).
* @method CarbonImmutable addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMicro() Add one microsecond to the instance (using timestamp).
* @method CarbonImmutable subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMicro() Sub one microsecond to the instance (using timestamp).
* @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
* @method CarbonImmutable addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMicrosecond() Add one microsecond to the instance (using timestamp).
* @method CarbonImmutable subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMicrosecond() Sub one microsecond to the instance (using timestamp).
* @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
* @method CarbonImmutable addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMilli() Add one millisecond to the instance (using timestamp).
* @method CarbonImmutable subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMilli() Sub one millisecond to the instance (using timestamp).
* @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
* @method CarbonImmutable addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMillisecond() Add one millisecond to the instance (using timestamp).
* @method CarbonImmutable subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMillisecond() Sub one millisecond to the instance (using timestamp).
* @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
* @method CarbonImmutable addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealSecond() Add one second to the instance (using timestamp).
* @method CarbonImmutable subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealSecond() Sub one second to the instance (using timestamp).
* @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given.
* @method CarbonImmutable addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMinute() Add one minute to the instance (using timestamp).
* @method CarbonImmutable subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMinute() Sub one minute to the instance (using timestamp).
* @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given.
* @method CarbonImmutable addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealHour() Add one hour to the instance (using timestamp).
* @method CarbonImmutable subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealHour() Sub one hour to the instance (using timestamp).
* @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given.
* @method CarbonImmutable addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealDay() Add one day to the instance (using timestamp).
* @method CarbonImmutable subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealDay() Sub one day to the instance (using timestamp).
* @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given.
* @method CarbonImmutable addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealWeek() Add one week to the instance (using timestamp).
* @method CarbonImmutable subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealWeek() Sub one week to the instance (using timestamp).
* @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given.
* @method CarbonImmutable addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMonth() Add one month to the instance (using timestamp).
* @method CarbonImmutable subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMonth() Sub one month to the instance (using timestamp).
* @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given.
* @method CarbonImmutable addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealQuarter() Add one quarter to the instance (using timestamp).
* @method CarbonImmutable subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealQuarter() Sub one quarter to the instance (using timestamp).
* @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given.
* @method CarbonImmutable addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealYear() Add one year to the instance (using timestamp).
* @method CarbonImmutable subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealYear() Sub one year to the instance (using timestamp).
* @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given.
* @method CarbonImmutable addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealDecade() Add one decade to the instance (using timestamp).
* @method CarbonImmutable subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealDecade() Sub one decade to the instance (using timestamp).
* @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given.
* @method CarbonImmutable addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealCentury() Add one century to the instance (using timestamp).
* @method CarbonImmutable subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealCentury() Sub one century to the instance (using timestamp).
* @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given.
* @method CarbonImmutable addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMillennium() Add one millennium to the instance (using timestamp).
* @method CarbonImmutable subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMillennium() Sub one millennium to the instance (using timestamp).
* @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given.
* @method CarbonImmutable roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
* @method CarbonImmutable roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
* @method CarbonImmutable floorYear(float $precision = 1) Truncate the current instance year with given precision.
* @method CarbonImmutable floorYears(float $precision = 1) Truncate the current instance year with given precision.
* @method CarbonImmutable ceilYear(float $precision = 1) Ceil the current instance year with given precision.
* @method CarbonImmutable ceilYears(float $precision = 1) Ceil the current instance year with given precision.
* @method CarbonImmutable roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
* @method CarbonImmutable roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
* @method CarbonImmutable floorMonth(float $precision = 1) Truncate the current instance month with given precision.
* @method CarbonImmutable floorMonths(float $precision = 1) Truncate the current instance month with given precision.
* @method CarbonImmutable ceilMonth(float $precision = 1) Ceil the current instance month with given precision.
* @method CarbonImmutable ceilMonths(float $precision = 1) Ceil the current instance month with given precision.
* @method CarbonImmutable roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
* @method CarbonImmutable roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
* @method CarbonImmutable floorDay(float $precision = 1) Truncate the current instance day with given precision.
* @method CarbonImmutable floorDays(float $precision = 1) Truncate the current instance day with given precision.
* @method CarbonImmutable ceilDay(float $precision = 1) Ceil the current instance day with given precision.
* @method CarbonImmutable ceilDays(float $precision = 1) Ceil the current instance day with given precision.
* @method CarbonImmutable roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
* @method CarbonImmutable roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
* @method CarbonImmutable floorHour(float $precision = 1) Truncate the current instance hour with given precision.
* @method CarbonImmutable floorHours(float $precision = 1) Truncate the current instance hour with given precision.
* @method CarbonImmutable ceilHour(float $precision = 1) Ceil the current instance hour with given precision.
* @method CarbonImmutable ceilHours(float $precision = 1) Ceil the current instance hour with given precision.
* @method CarbonImmutable roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
* @method CarbonImmutable roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
* @method CarbonImmutable floorMinute(float $precision = 1) Truncate the current instance minute with given precision.
* @method CarbonImmutable floorMinutes(float $precision = 1) Truncate the current instance minute with given precision.
* @method CarbonImmutable ceilMinute(float $precision = 1) Ceil the current instance minute with given precision.
* @method CarbonImmutable ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision.
* @method CarbonImmutable roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
* @method CarbonImmutable roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
* @method CarbonImmutable floorSecond(float $precision = 1) Truncate the current instance second with given precision.
* @method CarbonImmutable floorSeconds(float $precision = 1) Truncate the current instance second with given precision.
* @method CarbonImmutable ceilSecond(float $precision = 1) Ceil the current instance second with given precision.
* @method CarbonImmutable ceilSeconds(float $precision = 1) Ceil the current instance second with given precision.
* @method CarbonImmutable roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
* @method CarbonImmutable roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
* @method CarbonImmutable floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision.
* @method CarbonImmutable floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision.
* @method CarbonImmutable ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision.
* @method CarbonImmutable ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision.
* @method CarbonImmutable roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
* @method CarbonImmutable roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
* @method CarbonImmutable floorCentury(float $precision = 1) Truncate the current instance century with given precision.
* @method CarbonImmutable floorCenturies(float $precision = 1) Truncate the current instance century with given precision.
* @method CarbonImmutable ceilCentury(float $precision = 1) Ceil the current instance century with given precision.
* @method CarbonImmutable ceilCenturies(float $precision = 1) Ceil the current instance century with given precision.
* @method CarbonImmutable roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
* @method CarbonImmutable roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
* @method CarbonImmutable floorDecade(float $precision = 1) Truncate the current instance decade with given precision.
* @method CarbonImmutable floorDecades(float $precision = 1) Truncate the current instance decade with given precision.
* @method CarbonImmutable ceilDecade(float $precision = 1) Ceil the current instance decade with given precision.
* @method CarbonImmutable ceilDecades(float $precision = 1) Ceil the current instance decade with given precision.
* @method CarbonImmutable roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
* @method CarbonImmutable roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
* @method CarbonImmutable floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision.
* @method CarbonImmutable floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision.
* @method CarbonImmutable ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision.
* @method CarbonImmutable ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision.
* @method CarbonImmutable roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
* @method CarbonImmutable roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
* @method CarbonImmutable floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision.
* @method CarbonImmutable floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision.
* @method CarbonImmutable ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision.
* @method CarbonImmutable ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision.
* @method CarbonImmutable roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
* @method CarbonImmutable roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
* @method CarbonImmutable floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision.
* @method CarbonImmutable floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision.
* @method CarbonImmutable ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision.
* @method CarbonImmutable ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision.
* @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method static static|false createFromFormat(string $format, string $time, string|DateTimeZone $timezone = null) Parse a string into a new CarbonImmutable object according to the specified format.
* @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php
*
*
*/
class CarbonImmutable extends DateTimeImmutable implements CarbonInterface
{
use Date {
__clone as dateTraitClone;
}
public function __clone()
{
$this->dateTraitClone();
$this->endOfTime = false;
$this->startOfTime = false;
}
/**
* Create a very old date representing start of time.
*
* @return static
*/
public static function startOfTime(): self
{
$date = static::parse('0001-01-01')->years(self::getStartOfTimeYear());
$date->startOfTime = true;
return $date;
}
/**
* Create a very far date representing end of time.
*
* @return static
*/
public static function endOfTime(): self
{
$date = static::parse('9999-12-31 23:59:59.999999')->years(self::getEndOfTimeYear());
$date->endOfTime = true;
return $date;
}
/**
* @codeCoverageIgnore
*/
private static function getEndOfTimeYear(): int
{
if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) {
return 145261681241552;
}
// Remove if https://bugs.php.net/bug.php?id=81107 is fixed
if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) {
return 1118290769066902787;
}
return PHP_INT_MAX;
}
/**
* @codeCoverageIgnore
*/
private static function getStartOfTimeYear(): int
{
if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) {
return -135908816449551;
}
// Remove if https://bugs.php.net/bug.php?id=81107 is fixed
if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) {
return -1118290769066898816;
}
return max(PHP_INT_MIN, -9223372036854773760);
}
}
PK S ZayK &