Aggiornato Composer
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Carbon;
|
||||
|
||||
use Carbon\MessageFormatter\MessageFormatterMapper;
|
||||
use Closure;
|
||||
use ReflectionException;
|
||||
use ReflectionFunction;
|
||||
@@ -51,7 +52,7 @@ abstract class AbstractTranslator extends Translation\Translator
|
||||
/**
|
||||
* List of locales aliases.
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $aliases = [
|
||||
'me' => 'sr_Latn_ME',
|
||||
@@ -83,7 +84,7 @@ abstract class AbstractTranslator extends Translation\Translator
|
||||
$this->initializing = true;
|
||||
$this->directories = [__DIR__.'/Lang'];
|
||||
$this->addLoader('array', new ArrayLoader());
|
||||
parent::__construct($locale, $formatter, $cacheDir, $debug);
|
||||
parent::__construct($locale, new MessageFormatterMapper($formatter), $cacheDir, $debug);
|
||||
$this->initializing = false;
|
||||
}
|
||||
|
||||
@@ -220,8 +221,8 @@ abstract class AbstractTranslator extends Translation\Translator
|
||||
|
||||
$catalogue = $this->getCatalogue($locale);
|
||||
$format = $this instanceof TranslatorStrongTypeInterface
|
||||
? $this->getFromCatalogue($catalogue, (string) $id, $domain) // @codeCoverageIgnore
|
||||
: $this->getCatalogue($locale)->get((string) $id, $domain);
|
||||
? $this->getFromCatalogue($catalogue, (string) $id, $domain)
|
||||
: $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore
|
||||
|
||||
if ($format instanceof Closure) {
|
||||
// @codeCoverageIgnoreStart
|
||||
@@ -250,11 +251,7 @@ abstract class AbstractTranslator extends Translation\Translator
|
||||
*/
|
||||
protected function loadMessagesFromFile($locale)
|
||||
{
|
||||
if (isset($this->messages[$locale])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->resetMessages($locale);
|
||||
return isset($this->messages[$locale]) || $this->resetMessages($locale);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -311,7 +308,7 @@ abstract class AbstractTranslator extends Translation\Translator
|
||||
*/
|
||||
public function setLocale($locale)
|
||||
{
|
||||
$locale = preg_replace_callback('/[-_]([a-z]{2,}|[0-9]{2,})/', function ($matches) {
|
||||
$locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) {
|
||||
// _2-letters or YUE is a region, _3+-letters is a variant
|
||||
$upper = strtoupper($matches[1]);
|
||||
|
||||
@@ -359,13 +356,13 @@ abstract class AbstractTranslator extends Translation\Translator
|
||||
parent::setLocale($macroLocale);
|
||||
}
|
||||
|
||||
if ($this->loadMessagesFromFile($locale) || $this->initializing) {
|
||||
parent::setLocale($locale);
|
||||
|
||||
return true;
|
||||
if (!$this->loadMessagesFromFile($locale) && !$this->initializing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
parent::setLocale($locale);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
934
vendor/nesbot/carbon/src/Carbon/Carbon.php
vendored
934
vendor/nesbot/carbon/src/Carbon/Carbon.php
vendored
@@ -33,477 +33,477 @@ use DateTimeZone;
|
||||
* @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|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
|
||||
* @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 Carbon|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 Carbon __set_state(array $array) https://php.net/manual/en/datetime.set-state.php
|
||||
* @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, DateTimeZone|string|false|null $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
|
||||
*
|
||||
* </autodoc>
|
||||
*/
|
||||
|
||||
958
vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php
vendored
958
vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php
vendored
@@ -24,486 +24,486 @@ use DateTimeZone;
|
||||
*
|
||||
* <autodoc generated by `composer phpdoc`>
|
||||
*
|
||||
* @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
|
||||
* @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 CarbonImmutable|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 CarbonImmutable __set_state(array $array) https://php.net/manual/en/datetime.set-state.php
|
||||
* @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, DateTimeZone|string|false|null $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
|
||||
*
|
||||
* </autodoc>
|
||||
*/
|
||||
|
||||
113
vendor/nesbot/carbon/src/Carbon/CarbonInterface.php
vendored
113
vendor/nesbot/carbon/src/Carbon/CarbonInterface.php
vendored
@@ -586,6 +586,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
public const YEARS_PER_DECADE = 10;
|
||||
public const MONTHS_PER_YEAR = 12;
|
||||
public const MONTHS_PER_QUARTER = 3;
|
||||
public const QUARTERS_PER_YEAR = 4;
|
||||
public const WEEKS_PER_YEAR = 52;
|
||||
public const WEEKS_PER_MONTH = 4;
|
||||
public const DAYS_PER_YEAR = 365;
|
||||
@@ -726,6 +727,8 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
/**
|
||||
* Returns the list of properties to dump on serialize() called on.
|
||||
*
|
||||
* Only used by PHP < 7.4.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function __sleep();
|
||||
@@ -735,7 +738,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* echo Carbon::now(); // Carbon instances can be casted to string
|
||||
* echo Carbon::now(); // Carbon instances can be cast to string
|
||||
* ```
|
||||
*
|
||||
* @return string
|
||||
@@ -987,7 +990,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @param string $modifier
|
||||
*
|
||||
* @return static
|
||||
* @return static|false
|
||||
*/
|
||||
public function change($modifier);
|
||||
|
||||
@@ -1038,13 +1041,13 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
* If $hour is not null then the default values for $minute and $second
|
||||
* will be 0.
|
||||
*
|
||||
* @param int|null $year
|
||||
* @param int|null $month
|
||||
* @param int|null $day
|
||||
* @param int|null $hour
|
||||
* @param int|null $minute
|
||||
* @param int|null $second
|
||||
* @param DateTimeZone|string|null $tz
|
||||
* @param DateTimeInterface|int|null $year
|
||||
* @param int|null $month
|
||||
* @param int|null $day
|
||||
* @param int|null $hour
|
||||
* @param int|null $minute
|
||||
* @param int|null $second
|
||||
* @param DateTimeZone|string|null $tz
|
||||
*
|
||||
* @throws InvalidFormatException
|
||||
*
|
||||
@@ -1276,7 +1279,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @return CarbonInterval
|
||||
*/
|
||||
public function diffAsCarbonInterval($date = null, $absolute = true);
|
||||
public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []);
|
||||
|
||||
/**
|
||||
* Get the difference by the given interval using a filter closure.
|
||||
@@ -2116,6 +2119,18 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*/
|
||||
public static function getDays();
|
||||
|
||||
/**
|
||||
* Return the number of days since the start of the week (using the current locale or the first parameter
|
||||
* if explicitly given).
|
||||
*
|
||||
* @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week,
|
||||
* if not provided, start of week is inferred from the locale
|
||||
* (Sunday for en_US, Monday for de_DE, etc.)
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDaysFromStartOfWeek(?int $weekStartsAt = null): int;
|
||||
|
||||
/**
|
||||
* Get the fallback locale.
|
||||
*
|
||||
@@ -2738,12 +2753,35 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
public function isLeapYear();
|
||||
|
||||
/**
|
||||
* Determines if the instance is a long year
|
||||
* Determines if the instance is a long year (using ISO 8601 year).
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* Carbon::parse('2015-01-01')->isLongYear(); // true
|
||||
* Carbon::parse('2016-01-01')->isLongYear(); // false
|
||||
* Carbon::parse('2015-01-01')->isLongIsoYear(); // true
|
||||
* Carbon::parse('2016-01-01')->isLongIsoYear(); // true
|
||||
* Carbon::parse('2016-01-03')->isLongIsoYear(); // false
|
||||
* Carbon::parse('2019-12-29')->isLongIsoYear(); // false
|
||||
* Carbon::parse('2019-12-30')->isLongIsoYear(); // true
|
||||
* ```
|
||||
*
|
||||
* @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isLongIsoYear();
|
||||
|
||||
/**
|
||||
* Determines if the instance is a long year (using calendar year).
|
||||
*
|
||||
* ⚠️ This method completely ignores month and day to use the numeric year number,
|
||||
* it's not correct if the exact date matters. For instance as `2019-12-30` is already
|
||||
* in the first week of the 2020 year, if you want to know from this date if ISO week
|
||||
* year 2020 is a long year, use `isLongIsoYear` instead.
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* Carbon::create(2015)->isLongYear(); // true
|
||||
* Carbon::create(2016)->isLongYear(); // false
|
||||
* ```
|
||||
*
|
||||
* @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates
|
||||
@@ -3382,7 +3420,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @param string|int|null $modifier
|
||||
*
|
||||
* @return static
|
||||
* @return static|false
|
||||
*/
|
||||
public function next($modifier = null);
|
||||
|
||||
@@ -3528,7 +3566,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @param string|int|null $modifier
|
||||
*
|
||||
* @return static
|
||||
* @return static|false
|
||||
*/
|
||||
public function previous($modifier = null);
|
||||
|
||||
@@ -3773,6 +3811,19 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*/
|
||||
public function setDateTimeFrom($date = null);
|
||||
|
||||
/**
|
||||
* Set the day (keeping the current time) to the start of the week + the number of days passed as the first
|
||||
* parameter. First day of week is driven by the locale unless explicitly set with the second parameter.
|
||||
*
|
||||
* @param int $numberOfDays number of days to add after the start of the current week
|
||||
* @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week,
|
||||
* if not provided, start of week is inferred from the locale
|
||||
* (Sunday for en_US, Monday for de_DE, etc.)
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setDaysFromStartOfWeek(int $numberOfDays, ?int $weekStartsAt = null);
|
||||
|
||||
/**
|
||||
* Set the fallback locale.
|
||||
*
|
||||
@@ -3860,7 +3911,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* /!\ Use this method for unit tests only.
|
||||
*
|
||||
* @param Closure|static|string|false|null $testNow real or mock Carbon instance
|
||||
* @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance
|
||||
*/
|
||||
public static function setTestNow($testNow = null);
|
||||
|
||||
@@ -3881,7 +3932,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* /!\ Use this method for unit tests only.
|
||||
*
|
||||
* @param Closure|static|string|false|null $testNow real or mock Carbon instance
|
||||
* @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance
|
||||
*/
|
||||
public static function setTestNowAndTimezone($testNow = null, $tz = null);
|
||||
|
||||
@@ -3942,11 +3993,11 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
|
||||
/**
|
||||
* @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
* You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and
|
||||
* use other method or custom format passed to format() method if you need to dump an other string
|
||||
* You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and
|
||||
* use other method or custom format passed to format() method if you need to dump another string
|
||||
* format.
|
||||
*
|
||||
* Set the default format used when type juggling a Carbon instance to a string
|
||||
* Set the default format used when type juggling a Carbon instance to a string.
|
||||
*
|
||||
* @param string|Closure|null $format
|
||||
*
|
||||
@@ -4537,6 +4588,18 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*/
|
||||
public function toFormattedDateString();
|
||||
|
||||
/**
|
||||
* Format the instance with the day, and a readable date
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* echo Carbon::now()->toFormattedDayDateString();
|
||||
* ```
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toFormattedDayDateString(): string;
|
||||
|
||||
/**
|
||||
* Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept:
|
||||
* 1977-04-22T01:00:00-05:00).
|
||||
@@ -5057,12 +5120,14 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* /!\ Use this method for unit tests only.
|
||||
*
|
||||
* @param Closure|static|string|false|null $testNow real or mock Carbon instance
|
||||
* @param Closure|null $callback
|
||||
* @template T
|
||||
*
|
||||
* @return mixed
|
||||
* @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance
|
||||
* @param Closure(): T $callback
|
||||
*
|
||||
* @return T
|
||||
*/
|
||||
public static function withTestNow($testNow = null, $callback = null);
|
||||
public static function withTestNow($testNow, $callback);
|
||||
|
||||
/**
|
||||
* Create a Carbon instance for yesterday.
|
||||
|
||||
445
vendor/nesbot/carbon/src/Carbon/CarbonInterval.php
vendored
445
vendor/nesbot/carbon/src/Carbon/CarbonInterval.php
vendored
@@ -15,6 +15,7 @@ use Carbon\Exceptions\BadFluentConstructorException;
|
||||
use Carbon\Exceptions\BadFluentSetterException;
|
||||
use Carbon\Exceptions\InvalidCastException;
|
||||
use Carbon\Exceptions\InvalidIntervalException;
|
||||
use Carbon\Exceptions\OutOfRangeException;
|
||||
use Carbon\Exceptions\ParseErrorException;
|
||||
use Carbon\Exceptions\UnitNotConfiguredException;
|
||||
use Carbon\Exceptions\UnknownGetterException;
|
||||
@@ -22,15 +23,20 @@ use Carbon\Exceptions\UnknownSetterException;
|
||||
use Carbon\Exceptions\UnknownUnitException;
|
||||
use Carbon\Traits\IntervalRounding;
|
||||
use Carbon\Traits\IntervalStep;
|
||||
use Carbon\Traits\MagicParameter;
|
||||
use Carbon\Traits\Mixin;
|
||||
use Carbon\Traits\Options;
|
||||
use Carbon\Traits\ToStringFormat;
|
||||
use Closure;
|
||||
use DateInterval;
|
||||
use DateMalformedIntervalStringException;
|
||||
use DateTimeInterface;
|
||||
use DateTimeZone;
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
use ReflectionException;
|
||||
use ReturnTypeWillChange;
|
||||
use RuntimeException;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -46,7 +52,7 @@ use Throwable;
|
||||
* @property int $minutes Total minutes of the current interval.
|
||||
* @property int $seconds Total seconds of the current interval.
|
||||
* @property int $microseconds Total microseconds of the current interval.
|
||||
* @property int $milliseconds Total microseconds of the current interval.
|
||||
* @property int $milliseconds Total milliseconds of the current interval.
|
||||
* @property int $microExcludeMilli Remaining microseconds without the milliseconds.
|
||||
* @property int $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7).
|
||||
* @property int $daysExcludeWeeks alias of dayzExcludeWeeks
|
||||
@@ -184,10 +190,12 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
{
|
||||
use IntervalRounding;
|
||||
use IntervalStep;
|
||||
use MagicParameter;
|
||||
use Mixin {
|
||||
Mixin::mixin as baseMixin;
|
||||
}
|
||||
use Options;
|
||||
use ToStringFormat;
|
||||
|
||||
/**
|
||||
* Interval spec period designators
|
||||
@@ -241,6 +249,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*/
|
||||
private static $flipCascadeFactors;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private static $floatSettersEnabled = false;
|
||||
|
||||
/**
|
||||
* The registered macros.
|
||||
*
|
||||
@@ -294,7 +307,12 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*/
|
||||
public static function getCascadeFactors()
|
||||
{
|
||||
return static::$cascadeFactors ?: [
|
||||
return static::$cascadeFactors ?: static::getDefaultCascadeFactors();
|
||||
}
|
||||
|
||||
protected static function getDefaultCascadeFactors(): array
|
||||
{
|
||||
return [
|
||||
'milliseconds' => [Carbon::MICROSECONDS_PER_MILLISECOND, 'microseconds'],
|
||||
'seconds' => [Carbon::MILLISECONDS_PER_SECOND, 'milliseconds'],
|
||||
'minutes' => [Carbon::SECONDS_PER_MINUTE, 'seconds'],
|
||||
@@ -337,6 +355,19 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
static::$cascadeFactors = $cascadeFactors;
|
||||
}
|
||||
|
||||
/**
|
||||
* This option allow you to opt-in for the Carbon 3 behavior where float
|
||||
* values will no longer be cast to integer (so truncated).
|
||||
*
|
||||
* ⚠️ This settings will be applied globally, which mean your whole application
|
||||
* code including the third-party dependencies that also may use Carbon will
|
||||
* adopt the new behavior.
|
||||
*/
|
||||
public static function enableFloatSetters(bool $floatSettersEnabled = true): void
|
||||
{
|
||||
self::$floatSettersEnabled = $floatSettersEnabled;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//////////////////////////// CONSTRUCTORS /////////////////////////
|
||||
///////////////////////////////////////////////////////////////////
|
||||
@@ -344,14 +375,14 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Create a new CarbonInterval instance.
|
||||
*
|
||||
* @param int|null $years
|
||||
* @param int|null $months
|
||||
* @param int|null $weeks
|
||||
* @param int|null $days
|
||||
* @param int|null $hours
|
||||
* @param int|null $minutes
|
||||
* @param int|null $seconds
|
||||
* @param int|null $microseconds
|
||||
* @param Closure|DateInterval|string|int|null $years
|
||||
* @param int|float|null $months
|
||||
* @param int|float|null $weeks
|
||||
* @param int|float|null $days
|
||||
* @param int|float|null $hours
|
||||
* @param int|float|null $minutes
|
||||
* @param int|float|null $seconds
|
||||
* @param int|float|null $microseconds
|
||||
*
|
||||
* @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval.
|
||||
*/
|
||||
@@ -371,8 +402,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
|
||||
$spec = $years;
|
||||
$isStringSpec = (\is_string($spec) && !preg_match('/^[\d.]/', $spec));
|
||||
|
||||
if (!\is_string($spec) || (float) $years || preg_match('/^[0-9.]/', $years)) {
|
||||
if (!$isStringSpec || (float) $years) {
|
||||
$spec = static::PERIOD_PREFIX;
|
||||
|
||||
$spec .= $years > 0 ? $years.static::PERIOD_YEARS : '';
|
||||
@@ -397,7 +429,74 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
}
|
||||
|
||||
parent::__construct($spec);
|
||||
try {
|
||||
parent::__construct($spec);
|
||||
} catch (Throwable $exception) {
|
||||
try {
|
||||
parent::__construct('PT0S');
|
||||
|
||||
if ($isStringSpec) {
|
||||
if (!preg_match('/^P
|
||||
(?:(?<year>[+-]?\d*(?:\.\d+)?)Y)?
|
||||
(?:(?<month>[+-]?\d*(?:\.\d+)?)M)?
|
||||
(?:(?<week>[+-]?\d*(?:\.\d+)?)W)?
|
||||
(?:(?<day>[+-]?\d*(?:\.\d+)?)D)?
|
||||
(?:T
|
||||
(?:(?<hour>[+-]?\d*(?:\.\d+)?)H)?
|
||||
(?:(?<minute>[+-]?\d*(?:\.\d+)?)M)?
|
||||
(?:(?<second>[+-]?\d*(?:\.\d+)?)S)?
|
||||
)?
|
||||
$/x', $spec, $match)) {
|
||||
throw new InvalidArgumentException("Invalid duration: $spec");
|
||||
}
|
||||
|
||||
$years = (float) ($match['year'] ?? 0);
|
||||
$this->assertSafeForInteger('year', $years);
|
||||
$months = (float) ($match['month'] ?? 0);
|
||||
$this->assertSafeForInteger('month', $months);
|
||||
$weeks = (float) ($match['week'] ?? 0);
|
||||
$this->assertSafeForInteger('week', $weeks);
|
||||
$days = (float) ($match['day'] ?? 0);
|
||||
$this->assertSafeForInteger('day', $days);
|
||||
$hours = (float) ($match['hour'] ?? 0);
|
||||
$this->assertSafeForInteger('hour', $hours);
|
||||
$minutes = (float) ($match['minute'] ?? 0);
|
||||
$this->assertSafeForInteger('minute', $minutes);
|
||||
$seconds = (float) ($match['second'] ?? 0);
|
||||
$this->assertSafeForInteger('second', $seconds);
|
||||
}
|
||||
|
||||
$totalDays = (($weeks * static::getDaysPerWeek()) + $days);
|
||||
$this->assertSafeForInteger('days total (including weeks)', $totalDays);
|
||||
|
||||
$this->y = (int) $years;
|
||||
$this->m = (int) $months;
|
||||
$this->d = (int) $totalDays;
|
||||
$this->h = (int) $hours;
|
||||
$this->i = (int) $minutes;
|
||||
$this->s = (int) $seconds;
|
||||
|
||||
if (
|
||||
((float) $this->y) !== $years ||
|
||||
((float) $this->m) !== $months ||
|
||||
((float) $this->d) !== $totalDays ||
|
||||
((float) $this->h) !== $hours ||
|
||||
((float) $this->i) !== $minutes ||
|
||||
((float) $this->s) !== $seconds
|
||||
) {
|
||||
$this->add(static::fromString(
|
||||
($years - $this->y).' years '.
|
||||
($months - $this->m).' months '.
|
||||
($totalDays - $this->d).' days '.
|
||||
($hours - $this->h).' hours '.
|
||||
($minutes - $this->i).' minutes '.
|
||||
($seconds - $this->s).' seconds '
|
||||
));
|
||||
}
|
||||
} catch (Throwable $secondException) {
|
||||
throw $secondException instanceof OutOfRangeException ? $secondException : $exception;
|
||||
}
|
||||
}
|
||||
|
||||
if ($microseconds !== null) {
|
||||
$this->f = $microseconds / Carbon::MICROSECONDS_PER_SECOND;
|
||||
@@ -410,7 +509,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
* @param string $source
|
||||
* @param string $target
|
||||
*
|
||||
* @return int|null
|
||||
* @return int|float|null
|
||||
*/
|
||||
public static function getFactor($source, $target)
|
||||
{
|
||||
@@ -438,7 +537,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
* @param string $source
|
||||
* @param string $target
|
||||
*
|
||||
* @return int|null
|
||||
* @return int|float|null
|
||||
*/
|
||||
public static function getFactorWithDefault($source, $target)
|
||||
{
|
||||
@@ -465,7 +564,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Returns current config for days per week.
|
||||
*
|
||||
* @return int
|
||||
* @return int|float
|
||||
*/
|
||||
public static function getDaysPerWeek()
|
||||
{
|
||||
@@ -475,7 +574,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Returns current config for hours per day.
|
||||
*
|
||||
* @return int
|
||||
* @return int|float
|
||||
*/
|
||||
public static function getHoursPerDay()
|
||||
{
|
||||
@@ -485,7 +584,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Returns current config for minutes per hour.
|
||||
*
|
||||
* @return int
|
||||
* @return int|float
|
||||
*/
|
||||
public static function getMinutesPerHour()
|
||||
{
|
||||
@@ -495,7 +594,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Returns current config for seconds per minute.
|
||||
*
|
||||
* @return int
|
||||
* @return int|float
|
||||
*/
|
||||
public static function getSecondsPerMinute()
|
||||
{
|
||||
@@ -505,7 +604,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Returns current config for microseconds per second.
|
||||
*
|
||||
* @return int
|
||||
* @return int|float
|
||||
*/
|
||||
public static function getMillisecondsPerSecond()
|
||||
{
|
||||
@@ -515,7 +614,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Returns current config for microseconds per second.
|
||||
*
|
||||
* @return int
|
||||
* @return int|float
|
||||
*/
|
||||
public static function getMicrosecondsPerMillisecond()
|
||||
{
|
||||
@@ -673,6 +772,23 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate the PHP generated by var_export() and recreate the exported CarbonInterval instance.
|
||||
*
|
||||
* @param array $dump data as exported by var_export()
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public static function __set_state($dump)
|
||||
{
|
||||
/** @noinspection PhpVoidFunctionResultUsedInspection */
|
||||
/** @var DateInterval $dateInterval */
|
||||
$dateInterval = parent::__set_state($dump);
|
||||
|
||||
return static::instance($dateInterval);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current context from inside a macro callee or a new one if static.
|
||||
*
|
||||
@@ -767,6 +883,8 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
case 'year':
|
||||
case 'years':
|
||||
case 'y':
|
||||
case 'yr':
|
||||
case 'yrs':
|
||||
$years += $intValue;
|
||||
|
||||
break;
|
||||
@@ -780,6 +898,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
case 'month':
|
||||
case 'months':
|
||||
case 'mo':
|
||||
case 'mos':
|
||||
$months += $intValue;
|
||||
|
||||
break;
|
||||
@@ -882,7 +1001,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
return static::fromString(Carbon::translateTimeString($interval, $locale ?: static::getLocale(), 'en'));
|
||||
}
|
||||
|
||||
private static function castIntervalToClass(DateInterval $interval, string $className)
|
||||
private static function castIntervalToClass(DateInterval $interval, string $className, array $skip = [])
|
||||
{
|
||||
$mainClass = DateInterval::class;
|
||||
|
||||
@@ -891,7 +1010,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
|
||||
$microseconds = $interval->f;
|
||||
$instance = new $className(static::getDateIntervalSpec($interval));
|
||||
$instance = new $className(static::getDateIntervalSpec($interval, false, $skip));
|
||||
|
||||
if ($microseconds) {
|
||||
$instance->f = $microseconds;
|
||||
@@ -940,12 +1059,19 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
* set the $days field.
|
||||
*
|
||||
* @param DateInterval $interval
|
||||
* @param bool $skipCopy set to true to return the passed object
|
||||
* (without copying it) if it's already of the
|
||||
* current class
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function instance(DateInterval $interval)
|
||||
public static function instance(DateInterval $interval, array $skip = [], bool $skipCopy = false)
|
||||
{
|
||||
return self::castIntervalToClass($interval, static::class);
|
||||
if ($skipCopy && $interval instanceof static) {
|
||||
return $interval;
|
||||
}
|
||||
|
||||
return self::castIntervalToClass($interval, static::class, $skip);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -956,17 +1082,20 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*
|
||||
* @param mixed|int|DateInterval|string|Closure|null $interval interval or number of the given $unit
|
||||
* @param string|null $unit if specified, $interval must be an integer
|
||||
* @param bool $skipCopy set to true to return the passed object
|
||||
* (without copying it) if it's already of the
|
||||
* current class
|
||||
*
|
||||
* @return static|null
|
||||
*/
|
||||
public static function make($interval, $unit = null)
|
||||
public static function make($interval, $unit = null, bool $skipCopy = false)
|
||||
{
|
||||
if ($unit) {
|
||||
$interval = "$interval ".Carbon::pluralUnit($unit);
|
||||
}
|
||||
|
||||
if ($interval instanceof DateInterval) {
|
||||
return static::instance($interval);
|
||||
return static::instance($interval, [], $skipCopy);
|
||||
}
|
||||
|
||||
if ($interval instanceof Closure) {
|
||||
@@ -984,7 +1113,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
{
|
||||
$interval = preg_replace('/\s+/', ' ', trim($interval));
|
||||
|
||||
if (preg_match('/^P[T0-9]/', $interval)) {
|
||||
if (preg_match('/^P[T\d]/', $interval)) {
|
||||
return new static($interval);
|
||||
}
|
||||
|
||||
@@ -992,8 +1121,14 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
return static::fromString($interval);
|
||||
}
|
||||
|
||||
/** @var static $interval */
|
||||
$interval = static::createFromDateString($interval);
|
||||
// @codeCoverageIgnoreStart
|
||||
try {
|
||||
/** @var static $interval */
|
||||
$interval = static::createFromDateString($interval);
|
||||
} catch (DateMalformedIntervalStringException $e) {
|
||||
return null;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return !$interval || $interval->isEmpty() ? null : $interval;
|
||||
}
|
||||
@@ -1081,11 +1216,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND) % Carbon::MICROSECONDS_PER_MILLISECOND;
|
||||
|
||||
case 'weeks':
|
||||
return (int) ($this->d / static::getDaysPerWeek());
|
||||
return (int) ($this->d / (int) static::getDaysPerWeek());
|
||||
|
||||
case 'daysExcludeWeeks':
|
||||
case 'dayzExcludeWeeks':
|
||||
return $this->d % static::getDaysPerWeek();
|
||||
return $this->d % (int) static::getDaysPerWeek();
|
||||
|
||||
case 'locale':
|
||||
return $this->getTranslatorLocale();
|
||||
@@ -1126,43 +1261,63 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
foreach ($properties as $key => $value) {
|
||||
switch (Carbon::singularUnit(rtrim($key, 'z'))) {
|
||||
case 'year':
|
||||
$this->checkIntegerValue($key, $value);
|
||||
$this->y = $value;
|
||||
$this->handleDecimalPart('year', $value, $this->y);
|
||||
|
||||
break;
|
||||
|
||||
case 'month':
|
||||
$this->checkIntegerValue($key, $value);
|
||||
$this->m = $value;
|
||||
$this->handleDecimalPart('month', $value, $this->m);
|
||||
|
||||
break;
|
||||
|
||||
case 'week':
|
||||
$this->d = $value * static::getDaysPerWeek();
|
||||
$this->checkIntegerValue($key, $value);
|
||||
$days = $value * (int) static::getDaysPerWeek();
|
||||
$this->assertSafeForInteger('days total (including weeks)', $days);
|
||||
$this->d = $days;
|
||||
$this->handleDecimalPart('day', $days, $this->d);
|
||||
|
||||
break;
|
||||
|
||||
case 'day':
|
||||
$this->checkIntegerValue($key, $value);
|
||||
$this->d = $value;
|
||||
$this->handleDecimalPart('day', $value, $this->d);
|
||||
|
||||
break;
|
||||
|
||||
case 'daysexcludeweek':
|
||||
case 'dayzexcludeweek':
|
||||
$this->d = $this->weeks * static::getDaysPerWeek() + $value;
|
||||
$this->checkIntegerValue($key, $value);
|
||||
$days = $this->weeks * (int) static::getDaysPerWeek() + $value;
|
||||
$this->assertSafeForInteger('days total (including weeks)', $days);
|
||||
$this->d = $days;
|
||||
$this->handleDecimalPart('day', $days, $this->d);
|
||||
|
||||
break;
|
||||
|
||||
case 'hour':
|
||||
$this->checkIntegerValue($key, $value);
|
||||
$this->h = $value;
|
||||
$this->handleDecimalPart('hour', $value, $this->h);
|
||||
|
||||
break;
|
||||
|
||||
case 'minute':
|
||||
$this->checkIntegerValue($key, $value);
|
||||
$this->i = $value;
|
||||
$this->handleDecimalPart('minute', $value, $this->i);
|
||||
|
||||
break;
|
||||
|
||||
case 'second':
|
||||
$this->checkIntegerValue($key, $value);
|
||||
$this->s = $value;
|
||||
$this->handleDecimalPart('second', $value, $this->s);
|
||||
|
||||
break;
|
||||
|
||||
@@ -1355,11 +1510,15 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
|
||||
if (preg_match('/^(?<method>add|sub)(?<unit>[A-Z].*)$/', $method, $match)) {
|
||||
return $this->{$match['method']}($parameters[0], $match['unit']);
|
||||
$value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($match['unit']), 0);
|
||||
|
||||
return $this->{$match['method']}($value, $match['unit']);
|
||||
}
|
||||
|
||||
$value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($method), 1);
|
||||
|
||||
try {
|
||||
$this->set($method, \count($parameters) === 0 ? 1 : $parameters[0]);
|
||||
$this->set($method, $value);
|
||||
} catch (UnknownSetterException $exception) {
|
||||
if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) {
|
||||
throw new BadFluentSetterException($method, 0, $exception);
|
||||
@@ -1410,9 +1569,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
$minimumUnit = 's';
|
||||
$skip = [];
|
||||
extract($this->getForHumansInitialVariables($syntax, $short));
|
||||
$skip = array_filter((array) $skip, static function ($value) {
|
||||
$skip = array_map('strtolower', array_filter((array) $skip, static function ($value) {
|
||||
return \is_string($value) && $value !== '';
|
||||
});
|
||||
}));
|
||||
|
||||
if ($syntax === null) {
|
||||
$syntax = CarbonInterface::DIFF_ABSOLUTE;
|
||||
@@ -1435,11 +1594,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
];
|
||||
}
|
||||
|
||||
if ($altNumbers) {
|
||||
if ($altNumbers !== true) {
|
||||
$language = new Language($this->locale);
|
||||
$altNumbers = \in_array($language->getCode(), (array) $altNumbers);
|
||||
}
|
||||
if ($altNumbers && $altNumbers !== true) {
|
||||
$language = new Language($this->locale);
|
||||
$altNumbers = \in_array($language->getCode(), (array) $altNumbers, true);
|
||||
}
|
||||
|
||||
if (\is_array($join)) {
|
||||
@@ -1620,18 +1777,23 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
$unit = $short ? 's' : 'second';
|
||||
$isFuture = $this->invert === 1;
|
||||
$transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before');
|
||||
$declensionMode = null;
|
||||
|
||||
/** @var \Symfony\Component\Translation\Translator $translator */
|
||||
$translator = $this->getLocalTranslator();
|
||||
|
||||
$handleDeclensions = function ($unit, $count) use ($interpolations, $transId, $translator, $altNumbers, $absolute) {
|
||||
$handleDeclensions = function ($unit, $count, $index = 0, $parts = 1) use ($interpolations, $transId, $translator, $altNumbers, $absolute, &$declensionMode) {
|
||||
if (!$absolute) {
|
||||
// Some languages have special pluralization for past and future tense.
|
||||
$key = $unit.'_'.$transId;
|
||||
$result = $this->translate($key, $interpolations, $count, $translator, $altNumbers);
|
||||
$declensionMode = $declensionMode ?? $this->translate($transId.'_mode');
|
||||
|
||||
if ($result !== $key) {
|
||||
return $result;
|
||||
if ($this->needsDeclension($declensionMode, $index, $parts)) {
|
||||
// Some languages have special pluralization for past and future tense.
|
||||
$key = $unit.'_'.$transId;
|
||||
$result = $this->translate($key, $interpolations, $count, $translator, $altNumbers);
|
||||
|
||||
if ($result !== $key) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1696,17 +1858,17 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
}
|
||||
|
||||
$transChoice = function ($short, $unitData) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) {
|
||||
$transChoice = function ($short, $unitData, $index, $parts) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) {
|
||||
$count = $unitData['value'];
|
||||
|
||||
if ($short) {
|
||||
$result = $handleDeclensions($unitData['unitShort'], $count);
|
||||
$result = $handleDeclensions($unitData['unitShort'], $count, $index, $parts);
|
||||
|
||||
if ($result !== null) {
|
||||
return $result;
|
||||
}
|
||||
} elseif ($aUnit) {
|
||||
$result = $handleDeclensions('a_'.$unitData['unit'], $count);
|
||||
$result = $handleDeclensions('a_'.$unitData['unit'], $count, $index, $parts);
|
||||
|
||||
if ($result !== null) {
|
||||
return $result;
|
||||
@@ -1714,7 +1876,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
|
||||
if (!$absolute) {
|
||||
return $handleDeclensions($unitData['unit'], $count);
|
||||
return $handleDeclensions($unitData['unit'], $count, $index, $parts);
|
||||
}
|
||||
|
||||
return $this->translate($unitData['unit'], $interpolations, $count, $translator, $altNumbers);
|
||||
@@ -1726,7 +1888,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
if ($diffIntervalData['value'] > 0) {
|
||||
$unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit'];
|
||||
$count = $diffIntervalData['value'];
|
||||
$interval[] = $transChoice($short, $diffIntervalData);
|
||||
$interval[] = [$short, $diffIntervalData];
|
||||
} elseif ($options & CarbonInterface::SEQUENTIAL_PARTS_ONLY && \count($interval) > 0) {
|
||||
break;
|
||||
}
|
||||
@@ -1737,13 +1899,19 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
|
||||
// break the loop after we have reached the minimum unit
|
||||
if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']])) {
|
||||
if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']], true)) {
|
||||
$fallbackUnit = [$diffIntervalData['unit'], $diffIntervalData['unitShort']];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$actualParts = \count($interval);
|
||||
|
||||
foreach ($interval as $index => &$item) {
|
||||
$item = $transChoice($item[0], $item[1], $index, $actualParts);
|
||||
}
|
||||
|
||||
if (\count($interval) === 0) {
|
||||
if ($relativeToNow && $options & CarbonInterface::JUST_NOW) {
|
||||
$key = 'diff_now';
|
||||
@@ -1812,17 +1980,17 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$format = $this->localToStringFormat;
|
||||
$format = $this->localToStringFormat ?? static::$toStringFormat;
|
||||
|
||||
if ($format) {
|
||||
if ($format instanceof Closure) {
|
||||
return $format($this);
|
||||
}
|
||||
|
||||
return $this->format($format);
|
||||
if (!$format) {
|
||||
return $this->forHumans();
|
||||
}
|
||||
|
||||
return $this->forHumans();
|
||||
if ($format instanceof Closure) {
|
||||
return $format($this);
|
||||
}
|
||||
|
||||
return $this->format($format);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1863,7 +2031,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Invert the interval.
|
||||
*
|
||||
* @param bool|int $inverted if a parameter is passed, the passed value casted as 1 or 0 is used
|
||||
* @param bool|int $inverted if a parameter is passed, the passed value cast as 1 or 0 is used
|
||||
* as the new value of the ->invert property.
|
||||
*
|
||||
* @return $this
|
||||
@@ -2141,7 +2309,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDateIntervalSpec(DateInterval $interval)
|
||||
public static function getDateIntervalSpec(DateInterval $interval, bool $microseconds = false, array $skip = [])
|
||||
{
|
||||
$date = array_filter([
|
||||
static::PERIOD_YEARS => abs($interval->y),
|
||||
@@ -2149,10 +2317,25 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
static::PERIOD_DAYS => abs($interval->d),
|
||||
]);
|
||||
|
||||
if (
|
||||
$interval->days >= CarbonInterface::DAYS_PER_WEEK * CarbonInterface::WEEKS_PER_MONTH &&
|
||||
(!isset($date[static::PERIOD_YEARS]) || \count(array_intersect(['y', 'year', 'years'], $skip))) &&
|
||||
(!isset($date[static::PERIOD_MONTHS]) || \count(array_intersect(['m', 'month', 'months'], $skip)))
|
||||
) {
|
||||
$date = [
|
||||
static::PERIOD_DAYS => abs($interval->days),
|
||||
];
|
||||
}
|
||||
|
||||
$seconds = abs($interval->s);
|
||||
if ($microseconds && $interval->f > 0) {
|
||||
$seconds = sprintf('%d.%06d', $seconds, abs($interval->f) * 1000000);
|
||||
}
|
||||
|
||||
$time = array_filter([
|
||||
static::PERIOD_HOURS => abs($interval->h),
|
||||
static::PERIOD_MINUTES => abs($interval->i),
|
||||
static::PERIOD_SECONDS => abs($interval->s),
|
||||
static::PERIOD_SECONDS => $seconds,
|
||||
]);
|
||||
|
||||
$specString = static::PERIOD_PREFIX;
|
||||
@@ -2176,9 +2359,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function spec()
|
||||
public function spec(bool $microseconds = false)
|
||||
{
|
||||
return static::getDateIntervalSpec($this);
|
||||
return static::getDateIntervalSpec($this, $microseconds);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2229,9 +2412,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
$originalData = $this->toArray();
|
||||
$originalData['milliseconds'] = (int) ($originalData['microseconds'] / static::getMicrosecondsPerMillisecond());
|
||||
$originalData['microseconds'] = $originalData['microseconds'] % static::getMicrosecondsPerMillisecond();
|
||||
$originalData['daysExcludeWeeks'] = $originalData['days'];
|
||||
$originalData['weeks'] = (int) ($this->d / static::getDaysPerWeek());
|
||||
$originalData['daysExcludeWeeks'] = fmod($this->d, static::getDaysPerWeek());
|
||||
unset($originalData['days']);
|
||||
$newData = $originalData;
|
||||
$previous = [];
|
||||
|
||||
foreach (self::getFlipCascadeFactors() as $source => [$target, $factor]) {
|
||||
foreach (['source', 'target'] as $key) {
|
||||
@@ -2241,9 +2426,29 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
|
||||
$value = $newData[$source];
|
||||
$modulo = ($factor + ($value % $factor)) % $factor;
|
||||
$modulo = fmod($factor + fmod($value, $factor), $factor);
|
||||
$newData[$source] = $modulo;
|
||||
$newData[$target] += ($value - $modulo) / $factor;
|
||||
|
||||
$decimalPart = fmod($newData[$source], 1);
|
||||
|
||||
if ($decimalPart !== 0.0) {
|
||||
$unit = $source;
|
||||
|
||||
foreach ($previous as [$subUnit, $subFactor]) {
|
||||
$newData[$unit] -= $decimalPart;
|
||||
$newData[$subUnit] += $decimalPart * $subFactor;
|
||||
$decimalPart = fmod($newData[$subUnit], 1);
|
||||
|
||||
if ($decimalPart === 0.0) {
|
||||
break;
|
||||
}
|
||||
|
||||
$unit = $subUnit;
|
||||
}
|
||||
}
|
||||
|
||||
array_unshift($previous, [$source, $factor]);
|
||||
}
|
||||
|
||||
$positive = null;
|
||||
@@ -2324,13 +2529,13 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
$cumulativeFactor = 0;
|
||||
$unitFound = false;
|
||||
$factors = self::getFlipCascadeFactors();
|
||||
$daysPerWeek = static::getDaysPerWeek();
|
||||
$daysPerWeek = (int) static::getDaysPerWeek();
|
||||
|
||||
$values = [
|
||||
'years' => $this->years,
|
||||
'months' => $this->months,
|
||||
'weeks' => (int) ($this->d / $daysPerWeek),
|
||||
'dayz' => $this->d % $daysPerWeek,
|
||||
'dayz' => fmod($this->d, $daysPerWeek),
|
||||
'hours' => $this->hours,
|
||||
'minutes' => $this->minutes,
|
||||
'seconds' => $this->seconds,
|
||||
@@ -2391,10 +2596,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
}
|
||||
|
||||
if ($unit === 'weeks') {
|
||||
return $result / $daysPerWeek;
|
||||
$result /= $daysPerWeek;
|
||||
}
|
||||
|
||||
return $result;
|
||||
// Cast as int numbers with no decimal part
|
||||
return fmod($result, 1) === 0.0 ? (int) $result : $result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2662,6 +2868,15 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*/
|
||||
public function roundUnit($unit, $precision = 1, $function = 'round')
|
||||
{
|
||||
if (static::getCascadeFactors() !== static::getDefaultCascadeFactors()) {
|
||||
$value = $function($this->total($unit) / $precision) * $precision;
|
||||
$inverted = $value < 0;
|
||||
|
||||
return $this->copyProperties(self::fromString(
|
||||
number_format(abs($value), 12, '.', '').' '.$unit
|
||||
)->invert($inverted)->cascade());
|
||||
}
|
||||
|
||||
$base = CarbonImmutable::parse('2000-01-01 00:00:00', 'UTC')
|
||||
->roundUnit($unit, $precision, $function);
|
||||
$next = $base->add($this);
|
||||
@@ -2752,4 +2967,88 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
{
|
||||
return $this->round($precision, 'ceil');
|
||||
}
|
||||
|
||||
private function needsDeclension(string $mode, int $index, int $parts): bool
|
||||
{
|
||||
switch ($mode) {
|
||||
case 'last':
|
||||
return $index === $parts - 1;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private function checkIntegerValue(string $name, $value)
|
||||
{
|
||||
if (\is_int($value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->assertSafeForInteger($name, $value);
|
||||
|
||||
if (\is_float($value) && (((float) (int) $value) === $value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!self::$floatSettersEnabled) {
|
||||
$type = \gettype($value);
|
||||
@trigger_error(
|
||||
"Since 2.70.0, it's deprecated to pass $type value for $name.\n".
|
||||
"It's truncated when stored as an integer interval unit.\n".
|
||||
"From 3.0.0, decimal part will no longer be truncated and will be cascaded to smaller units.\n".
|
||||
"- To maintain the current behavior, use explicit cast: $name((int) \$value)\n".
|
||||
"- To adopt the new behavior globally, call CarbonInterval::enableFloatSetters()\n",
|
||||
\E_USER_DEPRECATED
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw an exception if precision loss when storing the given value as an integer would be >= 1.0.
|
||||
*/
|
||||
private function assertSafeForInteger(string $name, $value)
|
||||
{
|
||||
if ($value && !\is_int($value) && ($value >= 0x7fffffffffffffff || $value <= -0x7fffffffffffffff)) {
|
||||
throw new OutOfRangeException($name, -0x7fffffffffffffff, 0x7fffffffffffffff, $value);
|
||||
}
|
||||
}
|
||||
|
||||
private function handleDecimalPart(string $unit, $value, $integerValue)
|
||||
{
|
||||
if (self::$floatSettersEnabled) {
|
||||
$floatValue = (float) $value;
|
||||
$base = (float) $integerValue;
|
||||
|
||||
if ($floatValue === $base) {
|
||||
return;
|
||||
}
|
||||
|
||||
$units = [
|
||||
'y' => 'year',
|
||||
'm' => 'month',
|
||||
'd' => 'day',
|
||||
'h' => 'hour',
|
||||
'i' => 'minute',
|
||||
's' => 'second',
|
||||
];
|
||||
$upper = true;
|
||||
|
||||
foreach ($units as $property => $name) {
|
||||
if ($name === $unit) {
|
||||
$upper = false;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!$upper && $this->$property !== 0) {
|
||||
throw new RuntimeException(
|
||||
"You cannot set $unit to a float value as $name would be overridden, ".
|
||||
'set it first to 0 explicitly if you really want to erase its value'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->add($unit, $floatValue - $base);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
540
vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php
vendored
540
vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php
vendored
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@ class CarbonTimeZone extends DateTimeZone
|
||||
throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.');
|
||||
}
|
||||
|
||||
return ($timezone >= 0 ? '+' : '').$timezone.':00';
|
||||
return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00';
|
||||
}
|
||||
|
||||
protected static function getDateTimeZoneNameFromMixed($timezone)
|
||||
@@ -101,15 +101,15 @@ class CarbonTimeZone extends DateTimeZone
|
||||
$tz = static::getDateTimeZoneFromName($object);
|
||||
}
|
||||
|
||||
if ($tz === false) {
|
||||
if (Carbon::isStrictModeEnabled()) {
|
||||
throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')');
|
||||
}
|
||||
|
||||
return false;
|
||||
if ($tz !== false) {
|
||||
return new static($tz->getName());
|
||||
}
|
||||
|
||||
return new static($tz->getName());
|
||||
if (Carbon::isStrictModeEnabled()) {
|
||||
throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,15 +231,15 @@ class CarbonTimeZone extends DateTimeZone
|
||||
{
|
||||
$tz = $this->toRegionName($date);
|
||||
|
||||
if ($tz === false) {
|
||||
if (Carbon::isStrictModeEnabled()) {
|
||||
throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.');
|
||||
}
|
||||
|
||||
return false;
|
||||
if ($tz !== false) {
|
||||
return new static($tz);
|
||||
}
|
||||
|
||||
return new static($tz);
|
||||
if (Carbon::isStrictModeEnabled()) {
|
||||
throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,6 +252,18 @@ class CarbonTimeZone extends DateTimeZone
|
||||
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.
|
||||
*
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\Doctrine;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
|
||||
interface CarbonDoctrineType
|
||||
{
|
||||
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform);
|
||||
|
||||
public function convertToPHPValue($value, AbstractPlatform $platform);
|
||||
|
||||
public function convertToDatabaseValue($value, AbstractPlatform $platform);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\Doctrine;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
|
||||
class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrineType
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'carbon_immutable';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function requiresSQLCommentHint(AbstractPlatform $platform)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\Doctrine;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
|
||||
class CarbonType extends DateTimeType implements CarbonDoctrineType
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'carbon';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function requiresSQLCommentHint(AbstractPlatform $platform)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\Doctrine;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Carbon\CarbonInterface;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Types\ConversionException;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* @template T of CarbonInterface
|
||||
*/
|
||||
trait CarbonTypeConverter
|
||||
{
|
||||
/**
|
||||
* @return class-string<T>
|
||||
*/
|
||||
protected function getCarbonClassName(): string
|
||||
{
|
||||
return Carbon::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
|
||||
{
|
||||
$precision = $fieldDeclaration['precision'] ?: 10;
|
||||
|
||||
if ($fieldDeclaration['secondPrecision'] ?? false) {
|
||||
$precision = 0;
|
||||
}
|
||||
|
||||
if ($precision === 10) {
|
||||
$precision = DateTimeDefaultPrecision::get();
|
||||
}
|
||||
|
||||
$type = parent::getSQLDeclaration($fieldDeclaration, $platform);
|
||||
|
||||
if (!$precision) {
|
||||
return $type;
|
||||
}
|
||||
|
||||
if (str_contains($type, '(')) {
|
||||
return preg_replace('/\(\d+\)/', "($precision)", $type);
|
||||
}
|
||||
|
||||
[$before, $after] = explode(' ', "$type ");
|
||||
|
||||
return trim("$before($precision) $after");
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return T|null
|
||||
*/
|
||||
public function convertToPHPValue($value, AbstractPlatform $platform)
|
||||
{
|
||||
$class = $this->getCarbonClassName();
|
||||
|
||||
if ($value === null || is_a($value, $class)) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if ($value instanceof DateTimeInterface) {
|
||||
return $class::instance($value);
|
||||
}
|
||||
|
||||
$date = null;
|
||||
$error = null;
|
||||
|
||||
try {
|
||||
$date = $class::parse($value);
|
||||
} catch (Exception $exception) {
|
||||
$error = $exception;
|
||||
}
|
||||
|
||||
if (!$date) {
|
||||
throw ConversionException::conversionFailedFormat(
|
||||
$value,
|
||||
$this->getName(),
|
||||
'Y-m-d H:i:s.u or any format supported by '.$class.'::parse()',
|
||||
$error
|
||||
);
|
||||
}
|
||||
|
||||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function convertToDatabaseValue($value, AbstractPlatform $platform)
|
||||
{
|
||||
if ($value === null) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if ($value instanceof DateTimeInterface) {
|
||||
return $value->format('Y-m-d H:i:s.u');
|
||||
}
|
||||
|
||||
throw ConversionException::conversionFailedInvalidType(
|
||||
$value,
|
||||
$this->getName(),
|
||||
['null', 'DateTime', 'Carbon']
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\Doctrine;
|
||||
|
||||
class DateTimeDefaultPrecision
|
||||
{
|
||||
private static $precision = 6;
|
||||
|
||||
/**
|
||||
* Change the default Doctrine datetime and datetime_immutable precision.
|
||||
*
|
||||
* @param int $precision
|
||||
*/
|
||||
public static function set(int $precision): void
|
||||
{
|
||||
self::$precision = $precision;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default Doctrine datetime and datetime_immutable precision.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public static function get(): int
|
||||
{
|
||||
return self::$precision;
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Thanks to https://github.com/flaushi for his suggestion:
|
||||
* https://github.com/doctrine/dbal/issues/2873#issuecomment-534956358
|
||||
*/
|
||||
namespace Carbon\Doctrine;
|
||||
|
||||
use Carbon\CarbonImmutable;
|
||||
use Doctrine\DBAL\Types\VarDateTimeImmutableType;
|
||||
|
||||
class DateTimeImmutableType extends VarDateTimeImmutableType implements CarbonDoctrineType
|
||||
{
|
||||
/** @use CarbonTypeConverter<CarbonImmutable> */
|
||||
use CarbonTypeConverter;
|
||||
|
||||
/**
|
||||
* @return class-string<CarbonImmutable>
|
||||
*/
|
||||
protected function getCarbonClassName(): string
|
||||
{
|
||||
return CarbonImmutable::class;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Thanks to https://github.com/flaushi for his suggestion:
|
||||
* https://github.com/doctrine/dbal/issues/2873#issuecomment-534956358
|
||||
*/
|
||||
namespace Carbon\Doctrine;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Doctrine\DBAL\Types\VarDateTimeType;
|
||||
|
||||
class DateTimeType extends VarDateTimeType implements CarbonDoctrineType
|
||||
{
|
||||
/** @use CarbonTypeConverter<Carbon> */
|
||||
use CarbonTypeConverter;
|
||||
}
|
||||
@@ -11,19 +11,38 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class BadComparisonUnitException extends UnitException
|
||||
{
|
||||
/**
|
||||
* The unit.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $unit;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $unit
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $code = 0, Exception $previous = null)
|
||||
public function __construct($unit, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
|
||||
parent::__construct("Bad comparison unit: '$unit'", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the unit.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUnit(): string
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,19 +12,38 @@
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use BadMethodCallException as BaseBadMethodCallException;
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException
|
||||
{
|
||||
/**
|
||||
* The method.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $method;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $method
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($method, $code = 0, Exception $previous = null)
|
||||
public function __construct($method, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->method = $method;
|
||||
|
||||
parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the method.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethod(): string
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,19 +12,38 @@
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use BadMethodCallException as BaseBadMethodCallException;
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException
|
||||
{
|
||||
/**
|
||||
* The setter.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $setter;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $setter
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($method, $code = 0, Exception $previous = null)
|
||||
public function __construct($setter, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(sprintf("Unknown fluent setter '%s'", $method), $code, $previous);
|
||||
$this->setter = $setter;
|
||||
|
||||
parent::__construct(sprintf("Unknown fluent setter '%s'", $setter), $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the setter.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSetter(): string
|
||||
{
|
||||
return $this->setter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,5 @@ namespace Carbon\Exceptions;
|
||||
|
||||
interface BadMethodCallException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
@@ -13,4 +13,5 @@ namespace Carbon\Exceptions;
|
||||
|
||||
interface Exception
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,20 +11,38 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use RuntimeException as BaseRuntimeException;
|
||||
use Throwable;
|
||||
|
||||
class ImmutableException extends BaseRuntimeException implements RuntimeException
|
||||
{
|
||||
/**
|
||||
* The value.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $value;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $value the immutable type/value
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($value, $code = 0, Exception $previous = null)
|
||||
public function __construct($value, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->value = $value;
|
||||
parent::__construct("$value is immutable.", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue(): string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,5 @@ namespace Carbon\Exceptions;
|
||||
|
||||
interface InvalidArgumentException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
@@ -36,9 +36,9 @@ class InvalidDateException extends BaseInvalidArgumentException implements Inval
|
||||
* @param string $field
|
||||
* @param mixed $value
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($field, $value, $code = 0, Exception $previous = null)
|
||||
public function __construct($field, $value, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->field = $field;
|
||||
$this->value = $value;
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -12,24 +12,39 @@
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* The className.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $className;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $className
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($className, $code = 0, Exception $previous = null)
|
||||
public function __construct($className, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(sprintf(
|
||||
'Given class does not implement %s: %s',
|
||||
CarbonInterface::class,
|
||||
$className
|
||||
), $code, $previous);
|
||||
$this->className = $className;
|
||||
|
||||
parent::__construct(sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the className.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getClassName(): string
|
||||
{
|
||||
return $this->className;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
@@ -21,9 +21,9 @@ class NotLocaleAwareException extends BaseInvalidArgumentException implements In
|
||||
*
|
||||
* @param mixed $object
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($object, $code = 0, Exception $previous = null)
|
||||
public function __construct($object, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$dump = \is_object($object) ? \get_class($object) : \gettype($object);
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
// This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0
|
||||
// use OutOfRangeException as BaseOutOfRangeException;
|
||||
@@ -55,9 +55,9 @@ class OutOfRangeException extends BaseInvalidArgumentException implements Invali
|
||||
* @param mixed $max
|
||||
* @param mixed $value
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $min, $max, $value, $code = 0, Exception $previous = null)
|
||||
public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
$this->min = $min;
|
||||
|
||||
@@ -11,23 +11,78 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* The expected.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $expected;
|
||||
|
||||
/**
|
||||
* The actual.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $actual;
|
||||
|
||||
/**
|
||||
* The help message.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $help;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $expected
|
||||
* @param string $actual
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($expected, $actual, $help = '', $code = 0, Exception $previous = null)
|
||||
public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->expected = $expected;
|
||||
$this->actual = $actual;
|
||||
$this->help = $help;
|
||||
|
||||
$actual = $actual === '' ? 'data is missing' : "get '$actual'";
|
||||
|
||||
parent::__construct(trim("Format expected $expected but $actual\n$help"), $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the expected.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExpected(): string
|
||||
{
|
||||
return $this->expected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the actual.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getActual(): string
|
||||
{
|
||||
return $this->actual;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the help message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHelp(): string
|
||||
{
|
||||
return $this->help;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,5 @@ namespace Carbon\Exceptions;
|
||||
|
||||
interface RuntimeException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
@@ -11,19 +11,38 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class UnitNotConfiguredException extends UnitException
|
||||
{
|
||||
/**
|
||||
* The unit.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $unit;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $unit
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $code = 0, Exception $previous = null)
|
||||
public function __construct($unit, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
|
||||
parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the unit.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUnit(): string
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,20 +11,39 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* The getter.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $getter;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name getter name
|
||||
* @param string $getter getter name
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($name, $code = 0, Exception $previous = null)
|
||||
public function __construct($getter, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct("Unknown getter '$name'", $code, $previous);
|
||||
$this->getter = $getter;
|
||||
|
||||
parent::__construct("Unknown getter '$getter'", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the getter.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGetter(): string
|
||||
{
|
||||
return $this->getter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,19 +12,38 @@
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use BadMethodCallException as BaseBadMethodCallException;
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException
|
||||
{
|
||||
/**
|
||||
* The method.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $method;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $method
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($method, $code = 0, Exception $previous = null)
|
||||
public function __construct($method, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->method = $method;
|
||||
|
||||
parent::__construct("Method $method does not exist.", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the method.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethod(): string
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,20 +11,39 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException
|
||||
{
|
||||
/**
|
||||
* The setter.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $setter;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name setter name
|
||||
* @param string $setter setter name
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($name, $code = 0, Exception $previous = null)
|
||||
public function __construct($setter, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct("Unknown setter '$name'", $code, $previous);
|
||||
$this->setter = $setter;
|
||||
|
||||
parent::__construct("Unknown setter '$setter'", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the setter.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSetter(): string
|
||||
{
|
||||
return $this->setter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,19 +11,38 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class UnknownUnitException extends UnitException
|
||||
{
|
||||
/**
|
||||
* The unit.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $unit;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $unit
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $code = 0, Exception $previous = null)
|
||||
public function __construct($unit, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
|
||||
parent::__construct("Unknown unit '$unit'.", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the unit.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUnit(): string
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,20 +11,9 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use RuntimeException as BaseRuntimeException;
|
||||
|
||||
class UnreachableException extends BaseRuntimeException implements RuntimeException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
*/
|
||||
public function __construct($message, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
8
vendor/nesbot/carbon/src/Carbon/Factory.php
vendored
8
vendor/nesbot/carbon/src/Carbon/Factory.php
vendored
@@ -177,10 +177,10 @@ use ReflectionMethod;
|
||||
* parameter of null.
|
||||
* /!\ Use this method for unit tests only.
|
||||
* @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
* You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and
|
||||
* use other method or custom format passed to format() method if you need to dump an other string
|
||||
* You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and
|
||||
* use other method or custom format passed to format() method if you need to dump another string
|
||||
* format.
|
||||
* Set the default format used when type juggling a Carbon instance to a string
|
||||
* Set the default format used when type juggling a Carbon instance to a string.
|
||||
* @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use.
|
||||
* @method Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
* You should rather use UTF-8 language packages on every machine.
|
||||
@@ -231,7 +231,7 @@ use ReflectionMethod;
|
||||
* You should rather use the ->settings() method.
|
||||
* Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
|
||||
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
|
||||
* @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback.
|
||||
* @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback.
|
||||
* Using setTestNow to set the date, executing the callback, then
|
||||
* clearing the test instance.
|
||||
* /!\ Use this method for unit tests only.
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
namespace Carbon;
|
||||
|
||||
use Closure;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use Psr\Clock\ClockInterface;
|
||||
|
||||
/**
|
||||
* A factory to generate CarbonImmutable instances with common settings.
|
||||
@@ -111,7 +114,6 @@ use Closure;
|
||||
* @method CarbonImmutable maxValue() Create a Carbon instance for the greatest supported date.
|
||||
* @method CarbonImmutable minValue() Create a Carbon instance for the lowest supported date.
|
||||
* @method void mixin($mixin) Mix another object into the class.
|
||||
* @method CarbonImmutable now($tz = null) Get a Carbon instance for the current date and time.
|
||||
* @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string.
|
||||
* This is an alias for the constructor that allows better fluent syntax
|
||||
* as it allows you to do Carbon::parse('Monday next week')->fn() rather
|
||||
@@ -175,10 +177,10 @@ use Closure;
|
||||
* parameter of null.
|
||||
* /!\ Use this method for unit tests only.
|
||||
* @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
* You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and
|
||||
* use other method or custom format passed to format() method if you need to dump an other string
|
||||
* You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and
|
||||
* use other method or custom format passed to format() method if you need to dump another string
|
||||
* format.
|
||||
* Set the default format used when type juggling a Carbon instance to a string
|
||||
* Set the default format used when type juggling a Carbon instance to a string.
|
||||
* @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use.
|
||||
* @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
* You should rather use UTF-8 language packages on every machine.
|
||||
@@ -229,7 +231,7 @@ use Closure;
|
||||
* You should rather use the ->settings() method.
|
||||
* Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
|
||||
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
|
||||
* @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback.
|
||||
* @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback.
|
||||
* Using setTestNow to set the date, executing the callback, then
|
||||
* clearing the test instance.
|
||||
* /!\ Use this method for unit tests only.
|
||||
@@ -237,7 +239,21 @@ use Closure;
|
||||
*
|
||||
* </autodoc>
|
||||
*/
|
||||
class FactoryImmutable extends Factory
|
||||
class FactoryImmutable extends Factory implements ClockInterface
|
||||
{
|
||||
protected $className = CarbonImmutable::class;
|
||||
|
||||
/**
|
||||
* Get a Carbon instance for the current date and time.
|
||||
*
|
||||
* @param DateTimeZone|string|int|null $tz
|
||||
*
|
||||
* @return CarbonImmutable
|
||||
*/
|
||||
public function now($tz = null): DateTimeImmutable
|
||||
{
|
||||
$className = $this->className;
|
||||
|
||||
return new $className(null, $tz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* - JD Isaacks
|
||||
* - Atef Ben Ali (atefBB)
|
||||
* - Mohamed Sabil (mohamedsabil83)
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
$months = [
|
||||
'يناير',
|
||||
@@ -90,4 +91,5 @@ return [
|
||||
],
|
||||
'meridiem' => ['ص', 'م'],
|
||||
'weekend' => [5, 6],
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
];
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -9,5 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Authors:
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* - JD Isaacks
|
||||
* - Atef Ben Ali (atefBB)
|
||||
* - Mohamed Sabil (mohamedsabil83)
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
$months = [
|
||||
'يناير',
|
||||
@@ -89,4 +90,5 @@ return [
|
||||
],
|
||||
'meridiem' => ['ص', 'م'],
|
||||
'weekend' => [5, 6],
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
];
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* Authors:
|
||||
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'formats' => [
|
||||
@@ -23,4 +24,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
7
vendor/nesbot/carbon/src/Carbon/Lang/be.php
vendored
7
vendor/nesbot/carbon/src/Carbon/Lang/be.php
vendored
@@ -9,13 +9,12 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) {
|
||||
PluralizationRules::set(function ($number) {
|
||||
// @codeCoverageIgnoreStart
|
||||
if (class_exists(PluralizationRules::class)) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2);
|
||||
}, 'be');
|
||||
}
|
||||
|
||||
@@ -9,5 +9,15 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (class_exists(PluralizationRules::class)) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return PluralizationRules::get($number, 'ca');
|
||||
}, 'ca_ES_Valencia');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return array_replace_recursive(require __DIR__.'/ca.php', [
|
||||
]);
|
||||
|
||||
3
vendor/nesbot/carbon/src/Carbon/Lang/cs.php
vendored
3
vendor/nesbot/carbon/src/Carbon/Lang/cs.php
vendored
@@ -101,7 +101,8 @@ return [
|
||||
'after' => $za,
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 4,
|
||||
'months' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'],
|
||||
'months' => ['ledna', 'února', 'března', 'dubna', 'května', 'června', 'července', 'srpna', 'září', 'října', 'listopadu', 'prosince'],
|
||||
'months_standalone' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'],
|
||||
'months_short' => ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'],
|
||||
'weekdays' => ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
|
||||
'weekdays_short' => ['ned', 'pon', 'úte', 'stř', 'čtv', 'pát', 'sob'],
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/cy.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/cy.php
vendored
@@ -60,7 +60,7 @@ return [
|
||||
'ordinal' => function ($number) {
|
||||
return $number.(
|
||||
$number > 20
|
||||
? (\in_array($number, [40, 50, 60, 80, 100]) ? 'fed' : 'ain')
|
||||
? (\in_array((int) $number, [40, 50, 60, 80, 100], true) ? 'fed' : 'ain')
|
||||
: ([
|
||||
'', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
|
||||
'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed', // 11eg to 20fed
|
||||
|
||||
7
vendor/nesbot/carbon/src/Carbon/Lang/da.php
vendored
7
vendor/nesbot/carbon/src/Carbon/Lang/da.php
vendored
@@ -18,6 +18,7 @@
|
||||
* - Jens Herlevsen
|
||||
* - Ulrik McArdle (mcardle)
|
||||
* - Frederik Sauer (FrittenKeeZ)
|
||||
* - Janus Bahs Jacquet (kokoshneta)
|
||||
*/
|
||||
return [
|
||||
'year' => ':count år|:count år',
|
||||
@@ -41,7 +42,7 @@ return [
|
||||
'second' => ':count sekund|:count sekunder',
|
||||
'a_second' => 'få sekunder|:count sekunder',
|
||||
's' => ':count s.',
|
||||
'ago' => ':time siden',
|
||||
'ago' => 'for :time siden',
|
||||
'from_now' => 'om :time',
|
||||
'after' => ':time efter',
|
||||
'before' => ':time før',
|
||||
@@ -70,9 +71,9 @@ return [
|
||||
],
|
||||
'ordinal' => ':number.',
|
||||
'months' => ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'],
|
||||
'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
||||
'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'],
|
||||
'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'],
|
||||
'weekdays_short' => ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'],
|
||||
'weekdays_short' => ['søn.', 'man.', 'tir.', 'ons.', 'tor.', 'fre.', 'lør.'],
|
||||
'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'],
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 4,
|
||||
|
||||
9
vendor/nesbot/carbon/src/Carbon/Lang/de.php
vendored
9
vendor/nesbot/carbon/src/Carbon/Lang/de.php
vendored
@@ -105,4 +105,13 @@ return [
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 4,
|
||||
'list' => [', ', ' und '],
|
||||
'ordinal_words' => [
|
||||
'of' => 'im',
|
||||
'first' => 'erster',
|
||||
'second' => 'zweiter',
|
||||
'third' => 'dritter',
|
||||
'fourth' => 'vierten',
|
||||
'fifth' => 'fünfter',
|
||||
'last' => 'letzten',
|
||||
],
|
||||
];
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/en.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/en.php
vendored
@@ -72,7 +72,7 @@ return [
|
||||
$lastDigit = $number % 10;
|
||||
|
||||
return $number.(
|
||||
(~~($number % 100 / 10) === 1) ? 'th' : (
|
||||
((int) ($number % 100 / 10) === 1) ? 'th' : (
|
||||
($lastDigit === 1) ? 'st' : (
|
||||
($lastDigit === 2) ? 'nd' : (
|
||||
($lastDigit === 3) ? 'rd' : 'th'
|
||||
|
||||
@@ -11,4 +11,12 @@
|
||||
|
||||
return array_replace_recursive(require __DIR__.'/en.php', [
|
||||
'first_day_of_week' => 1,
|
||||
'formats' => [
|
||||
'LT' => 'HH:mm',
|
||||
'LTS' => 'HH:mm:ss',
|
||||
'L' => 'DD.MM.YYYY',
|
||||
'LL' => 'D MMMM YYYY',
|
||||
'LLL' => 'D MMMM YYYY HH:mm',
|
||||
'LLLL' => 'dddd D MMMM YYYY HH:mm',
|
||||
],
|
||||
]);
|
||||
|
||||
10
vendor/nesbot/carbon/src/Carbon/Lang/es.php
vendored
10
vendor/nesbot/carbon/src/Carbon/Lang/es.php
vendored
@@ -26,6 +26,7 @@
|
||||
* - quinterocesar
|
||||
* - Daniel Commesse Liévanos (danielcommesse)
|
||||
* - Pete Scopes (pdscopes)
|
||||
* - gam04
|
||||
*/
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
@@ -108,4 +109,13 @@ return [
|
||||
'day_of_first_week_of_year' => 4,
|
||||
'list' => [', ', ' y '],
|
||||
'meridiem' => ['a. m.', 'p. m.'],
|
||||
'ordinal_words' => [
|
||||
'of' => 'de',
|
||||
'first' => 'primer',
|
||||
'second' => 'segundo',
|
||||
'third' => 'tercer',
|
||||
'fourth' => 'cuarto',
|
||||
'fifth' => 'quinto',
|
||||
'last' => 'último',
|
||||
],
|
||||
];
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/fi.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/fi.php
vendored
@@ -74,8 +74,10 @@ return [
|
||||
'LTS' => 'HH.mm:ss',
|
||||
'L' => 'D.M.YYYY',
|
||||
'LL' => 'dddd D. MMMM[ta] YYYY',
|
||||
'll' => 'ddd D. MMM YYYY',
|
||||
'LLL' => 'D.MM. HH.mm',
|
||||
'LLLL' => 'D. MMMM[ta] YYYY HH.mm',
|
||||
'llll' => 'D. MMM YY HH.mm',
|
||||
],
|
||||
'weekdays' => ['sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai'],
|
||||
'weekdays_short' => ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'],
|
||||
|
||||
11
vendor/nesbot/carbon/src/Carbon/Lang/fr.php
vendored
11
vendor/nesbot/carbon/src/Carbon/Lang/fr.php
vendored
@@ -90,7 +90,7 @@ return [
|
||||
'weekdays_min' => ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'],
|
||||
'ordinal' => function ($number, $period) {
|
||||
switch ($period) {
|
||||
// In french, only the first has be ordinal, other number remains cardinal
|
||||
// In French, only the first has to be ordinal, other number remains cardinal
|
||||
// @link https://fr.wikihow.com/%C3%A9crire-la-date-en-fran%C3%A7ais
|
||||
case 'D':
|
||||
return $number.($number === 1 ? 'er' : '');
|
||||
@@ -111,4 +111,13 @@ return [
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 4,
|
||||
'list' => [', ', ' et '],
|
||||
'ordinal_words' => [
|
||||
'of' => 'de',
|
||||
'first' => 'premier',
|
||||
'second' => 'deuxième',
|
||||
'third' => 'troisième',
|
||||
'fourth' => 'quatrième',
|
||||
'fifth' => 'cinquième',
|
||||
'last' => 'dernier',
|
||||
],
|
||||
];
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/hu.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/hu.php
vendored
@@ -82,7 +82,7 @@ return [
|
||||
'second_before' => ':count másodperccel',
|
||||
's_before' => ':count másodperccel',
|
||||
'months' => ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'],
|
||||
'months_short' => ['jan.', 'feb.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'],
|
||||
'months_short' => ['jan.', 'febr.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'],
|
||||
'weekdays' => ['vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat'],
|
||||
'weekdays_short' => ['vas', 'hét', 'kedd', 'sze', 'csüt', 'pén', 'szo'],
|
||||
'weekdays_min' => ['v', 'h', 'k', 'sze', 'cs', 'p', 'sz'],
|
||||
|
||||
11
vendor/nesbot/carbon/src/Carbon/Lang/it.php
vendored
11
vendor/nesbot/carbon/src/Carbon/Lang/it.php
vendored
@@ -55,7 +55,7 @@ return [
|
||||
'µs' => ':countµs',
|
||||
'ago' => ':time fa',
|
||||
'from_now' => function ($time) {
|
||||
return (preg_match('/^[0-9].+$/', $time) ? 'tra' : 'in')." $time";
|
||||
return (preg_match('/^\d.+$/', $time) ? 'tra' : 'in')." $time";
|
||||
},
|
||||
'after' => ':time dopo',
|
||||
'before' => ':time prima',
|
||||
@@ -103,4 +103,13 @@ return [
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 4,
|
||||
'list' => [', ', ' e '],
|
||||
'ordinal_words' => [
|
||||
'of' => 'di',
|
||||
'first' => 'primo',
|
||||
'second' => 'secondo',
|
||||
'third' => 'terzo',
|
||||
'fourth' => 'quarto',
|
||||
'fifth' => 'quinto',
|
||||
'last' => 'ultimo',
|
||||
],
|
||||
];
|
||||
|
||||
42
vendor/nesbot/carbon/src/Carbon/Lang/ku.php
vendored
42
vendor/nesbot/carbon/src/Carbon/Lang/ku.php
vendored
@@ -11,31 +11,29 @@
|
||||
|
||||
/*
|
||||
* Authors:
|
||||
* - Halwest Manguri
|
||||
* - Kardo Qadir
|
||||
* - Unicode, Inc.
|
||||
*/
|
||||
$months = ['کانونی دووەم', 'شوبات', 'ئازار', 'نیسان', 'ئایار', 'حوزەیران', 'تەمموز', 'ئاب', 'ئەیلول', 'تشرینی یەکەم', 'تشرینی دووەم', 'کانونی یەکەم'];
|
||||
|
||||
$weekdays = ['دوو شەممە', 'سێ شەممە', 'چوار شەممە', 'پێنج شەممە', 'هەینی', 'شەممە', 'یەک شەممە'];
|
||||
|
||||
return [
|
||||
'ago' => 'پێش :time',
|
||||
'from_now' => ':time لە ئێستاوە',
|
||||
'after' => 'دوای :time',
|
||||
'before' => 'پێش :time',
|
||||
'year' => '{0}ساڵ|{1}ساڵێک|{2}٢ ساڵ|[3,10]:count ساڵ|[11,Inf]:count ساڵ',
|
||||
'month' => '{0}مانگ|{1}مانگێک|{2}٢ مانگ|[3,10]:count مانگ|[11,Inf]:count مانگ',
|
||||
'week' => '{0}هەفتە|{1}هەفتەیەک|{2}٢ هەفتە|[3,10]:count هەفتە|[11,Inf]:count هەفتە',
|
||||
'day' => '{0}ڕۆژ|{1}ڕۆژێک|{2}٢ ڕۆژ|[3,10]:count ڕۆژ|[11,Inf]:count ڕۆژ',
|
||||
'hour' => '{0}کاتژمێر|{1}کاتژمێرێک|{2}٢ کاتژمێر|[3,10]:count کاتژمێر|[11,Inf]:count کاتژمێر',
|
||||
'minute' => '{0}خولەک|{1}خولەکێک|{2}٢ خولەک|[3,10]:count خولەک|[11,Inf]:count خولەک',
|
||||
'second' => '{0}چرکە|{1}چرکەیەک|{2}٢ چرکە|[3,10]:count چرکە|[11,Inf]:count چرکە',
|
||||
'months' => $months,
|
||||
'months_standalone' => $months,
|
||||
'months_short' => $months,
|
||||
'weekdays' => $weekdays,
|
||||
'weekdays_short' => $weekdays,
|
||||
'weekdays_min' => $weekdays,
|
||||
'ago' => 'berî :time',
|
||||
'from_now' => 'di :time de',
|
||||
'after' => ':time piştî',
|
||||
'before' => ':time berê',
|
||||
'year' => ':count sal',
|
||||
'year_ago' => ':count salê|:count salan',
|
||||
'year_from_now' => 'salekê|:count salan',
|
||||
'month' => ':count meh',
|
||||
'week' => ':count hefte',
|
||||
'day' => ':count roj',
|
||||
'hour' => ':count saet',
|
||||
'minute' => ':count deqîqe',
|
||||
'second' => ':count saniye',
|
||||
'months' => ['rêbendanê', 'reşemiyê', 'adarê', 'avrêlê', 'gulanê', 'pûşperê', 'tîrmehê', 'gelawêjê', 'rezberê', 'kewçêrê', 'sermawezê', 'berfanbarê'],
|
||||
'months_standalone' => ['rêbendan', 'reşemî', 'adar', 'avrêl', 'gulan', 'pûşper', 'tîrmeh', 'gelawêj', 'rezber', 'kewçêr', 'sermawez', 'berfanbar'],
|
||||
'months_short' => ['rêb', 'reş', 'ada', 'avr', 'gul', 'pûş', 'tîr', 'gel', 'rez', 'kew', 'ser', 'ber'],
|
||||
'weekdays' => ['yekşem', 'duşem', 'sêşem', 'çarşem', 'pêncşem', 'în', 'şemî'],
|
||||
'weekdays_short' => ['yş', 'dş', 'sş', 'çş', 'pş', 'în', 'ş'],
|
||||
'weekdays_min' => ['Y', 'D', 'S', 'Ç', 'P', 'Î', 'Ş'],
|
||||
'list' => [', ', ' û '],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
|
||||
3
vendor/nesbot/carbon/src/Carbon/Lang/lv.php
vendored
3
vendor/nesbot/carbon/src/Carbon/Lang/lv.php
vendored
@@ -176,7 +176,8 @@ return [
|
||||
'weekdays' => $daysOfWeek,
|
||||
'weekdays_short' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'],
|
||||
'weekdays_min' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'],
|
||||
'months' => ['janvārī', 'februārī', 'martā', 'aprīlī', 'maijā', 'jūnijā', 'jūlijā', 'augustā', 'septembrī', 'oktobrī', 'novembrī', 'decembrī'],
|
||||
'months' => ['janvāris', 'februāris', 'marts', 'aprīlis', 'maijs', 'jūnijs', 'jūlijs', 'augusts', 'septembris', 'oktobris', 'novembris', 'decembris'],
|
||||
'months_standalone' => ['janvārī', 'februārī', 'martā', 'aprīlī', 'maijā', 'jūnijā', 'jūlijā', 'augustā', 'septembrī', 'oktobrī', 'novembrī', 'decembrī'],
|
||||
'months_short' => ['janv.', 'febr.', 'martā', 'apr.', 'maijā', 'jūn.', 'jūl.', 'aug.', 'sept.', 'okt.', 'nov.', 'dec.'],
|
||||
'meridiem' => ['priekšpusdiena', 'pēcpusdiena'],
|
||||
];
|
||||
|
||||
62
vendor/nesbot/carbon/src/Carbon/Lang/mn.php
vendored
62
vendor/nesbot/carbon/src/Carbon/Lang/mn.php
vendored
@@ -26,6 +26,7 @@
|
||||
* - Nicolás Hock Isaza
|
||||
* - Ochirkhuyag
|
||||
* - Batmandakh
|
||||
* - lucifer-crybaby
|
||||
*/
|
||||
return [
|
||||
'year' => ':count жил',
|
||||
@@ -43,38 +44,55 @@ return [
|
||||
'second' => ':count секунд',
|
||||
's' => ':countс',
|
||||
|
||||
'ago' => ':timeн өмнө',
|
||||
'year_ago' => ':count жилий',
|
||||
'month_ago' => ':count сары',
|
||||
'day_ago' => ':count хоногий',
|
||||
'hour_ago' => ':count цагий',
|
||||
'minute_ago' => ':count минуты',
|
||||
'second_ago' => ':count секунды',
|
||||
'ago_mode' => 'last',
|
||||
'ago' => ':time өмнө',
|
||||
'year_ago' => ':count жилийн',
|
||||
'y_ago' => ':count жилийн',
|
||||
'month_ago' => ':count сарын',
|
||||
'm_ago' => ':count сарын',
|
||||
'day_ago' => ':count хоногийн',
|
||||
'd_ago' => ':count хоногийн',
|
||||
'week_ago' => ':count долоо хоногийн',
|
||||
'w_ago' => ':count долоо хоногийн',
|
||||
'hour_ago' => ':count цагийн',
|
||||
'minute_ago' => ':count минутын',
|
||||
'second_ago' => ':count секундын',
|
||||
|
||||
'from_now_mode' => 'last',
|
||||
'from_now' => 'одоогоос :time',
|
||||
'year_from_now' => ':count жилийн дараа',
|
||||
'y_from_now' => ':count жилийн дараа',
|
||||
'month_from_now' => ':count сарын дараа',
|
||||
'm_from_now' => ':count сарын дараа',
|
||||
'day_from_now' => ':count хоногийн дараа',
|
||||
'd_from_now' => ':count хоногийн дараа',
|
||||
'hour_from_now' => ':count цагийн дараа',
|
||||
'minute_from_now' => ':count минутын дараа',
|
||||
'second_from_now' => ':count секундын дараа',
|
||||
|
||||
// Does it required to make translation for before, after as follows? hmm, I think we've made it with ago and from now keywords already. Anyway, I've included it just in case of undesired action...
|
||||
'after' => ':timeн дараа',
|
||||
'year_after' => ':count жилий',
|
||||
'month_after' => ':count сары',
|
||||
'day_after' => ':count хоногий',
|
||||
'hour_after' => ':count цагий',
|
||||
'minute_after' => ':count минуты',
|
||||
'second_after' => ':count секунды',
|
||||
'after_mode' => 'last',
|
||||
'after' => ':time дараа',
|
||||
'year_after' => ':count жилийн',
|
||||
'y_after' => ':count жилийн',
|
||||
'month_after' => ':count сарын',
|
||||
'm_after' => ':count сарын',
|
||||
'day_after' => ':count хоногийн',
|
||||
'd_after' => ':count хоногийн',
|
||||
'hour_after' => ':count цагийн',
|
||||
'minute_after' => ':count минутын',
|
||||
'second_after' => ':count секундын',
|
||||
|
||||
'before' => ':timeн өмнө',
|
||||
'year_before' => ':count жилий',
|
||||
'month_before' => ':count сары',
|
||||
'day_before' => ':count хоногий',
|
||||
'hour_before' => ':count цагий',
|
||||
'minute_before' => ':count минуты',
|
||||
'second_before' => ':count секунды',
|
||||
'before_mode' => 'last',
|
||||
'before' => ':time өмнө',
|
||||
'year_before' => ':count жилийн',
|
||||
'y_before' => ':count жилийн',
|
||||
'month_before' => ':count сарын',
|
||||
'm_before' => ':count сарын',
|
||||
'day_before' => ':count хоногийн',
|
||||
'd_before' => ':count хоногийн',
|
||||
'hour_before' => ':count цагийн',
|
||||
'minute_before' => ':count минутын',
|
||||
'second_before' => ':count секундын',
|
||||
|
||||
'list' => ', ',
|
||||
'diff_now' => 'одоо',
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/ms.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/ms.php
vendored
@@ -48,7 +48,7 @@ return [
|
||||
'ago' => ':time yang lepas',
|
||||
'from_now' => ':time dari sekarang',
|
||||
'after' => ':time kemudian',
|
||||
'before' => ':time lepas',
|
||||
'before' => ':time sebelum',
|
||||
'diff_now' => 'sekarang',
|
||||
'diff_today' => 'Hari',
|
||||
'diff_today_regexp' => 'Hari(?:\\s+ini)?(?:\\s+pukul)?',
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/oc.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/oc.php
vendored
@@ -17,7 +17,7 @@
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) {
|
||||
PluralizationRules::set(function ($number) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return $number == 1 ? 0 : 1;
|
||||
}, 'oc');
|
||||
}
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/pl.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/pl.php
vendored
@@ -62,7 +62,7 @@ return [
|
||||
},
|
||||
'after' => ':time po',
|
||||
'before' => ':time przed',
|
||||
'diff_now' => 'przed chwilą',
|
||||
'diff_now' => 'teraz',
|
||||
'diff_today' => 'Dziś',
|
||||
'diff_today_regexp' => 'Dziś(?:\\s+o)?',
|
||||
'diff_yesterday' => 'wczoraj',
|
||||
|
||||
9
vendor/nesbot/carbon/src/Carbon/Lang/pt.php
vendored
9
vendor/nesbot/carbon/src/Carbon/Lang/pt.php
vendored
@@ -104,4 +104,13 @@ return [
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 4,
|
||||
'list' => [', ', ' e '],
|
||||
'ordinal_words' => [
|
||||
'of' => 'de',
|
||||
'first' => 'primeira',
|
||||
'second' => 'segunda',
|
||||
'third' => 'terceira',
|
||||
'fourth' => 'quarta',
|
||||
'fifth' => 'quinta',
|
||||
'last' => 'última',
|
||||
],
|
||||
];
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/sh.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/sh.php
vendored
@@ -13,7 +13,7 @@
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) {
|
||||
PluralizationRules::set(function ($number) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2);
|
||||
}, 'sh');
|
||||
}
|
||||
|
||||
112
vendor/nesbot/carbon/src/Carbon/Lang/sk.php
vendored
112
vendor/nesbot/carbon/src/Carbon/Lang/sk.php
vendored
@@ -31,33 +31,89 @@
|
||||
* - jofi
|
||||
* - Jakub ADAMEC
|
||||
* - Marek Adamický
|
||||
* - AlterwebStudio
|
||||
*/
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
|
||||
$fromNow = function ($time) {
|
||||
return 'o '.strtr($time, [
|
||||
'hodina' => 'hodinu',
|
||||
'minúta' => 'minútu',
|
||||
'sekunda' => 'sekundu',
|
||||
]);
|
||||
};
|
||||
|
||||
$ago = function ($time) {
|
||||
$replacements = [
|
||||
'/\bhodina\b/' => 'hodinou',
|
||||
'/\bminúta\b/' => 'minútou',
|
||||
'/\bsekunda\b/' => 'sekundou',
|
||||
'/\bdeň\b/u' => 'dňom',
|
||||
'/\btýždeň\b/u' => 'týždňom',
|
||||
'/\bmesiac\b/' => 'mesiacom',
|
||||
'/\brok\b/' => 'rokom',
|
||||
];
|
||||
|
||||
$replacementsPlural = [
|
||||
'/\bhodiny\b/' => 'hodinami',
|
||||
'/\bminúty\b/' => 'minútami',
|
||||
'/\bsekundy\b/' => 'sekundami',
|
||||
'/\bdni\b/' => 'dňami',
|
||||
'/\btýždne\b/' => 'týždňami',
|
||||
'/\bmesiace\b/' => 'mesiacmi',
|
||||
'/\broky\b/' => 'rokmi',
|
||||
];
|
||||
|
||||
foreach ($replacements + $replacementsPlural as $pattern => $replacement) {
|
||||
$time = preg_replace($pattern, $replacement, $time);
|
||||
}
|
||||
|
||||
return "pred $time";
|
||||
};
|
||||
|
||||
return [
|
||||
'year' => 'rok|:count roky|:count rokov',
|
||||
'year' => ':count rok|:count roky|:count rokov',
|
||||
'a_year' => 'rok|:count roky|:count rokov',
|
||||
'y' => ':count r',
|
||||
'month' => 'mesiac|:count mesiace|:count mesiacov',
|
||||
'month' => ':count mesiac|:count mesiace|:count mesiacov',
|
||||
'a_month' => 'mesiac|:count mesiace|:count mesiacov',
|
||||
'm' => ':count m',
|
||||
'week' => 'týždeň|:count týždne|:count týždňov',
|
||||
'week' => ':count týždeň|:count týždne|:count týždňov',
|
||||
'a_week' => 'týždeň|:count týždne|:count týždňov',
|
||||
'w' => ':count t',
|
||||
'day' => 'deň|:count dni|:count dní',
|
||||
'day' => ':count deň|:count dni|:count dní',
|
||||
'a_day' => 'deň|:count dni|:count dní',
|
||||
'd' => ':count d',
|
||||
'hour' => 'hodinu|:count hodiny|:count hodín',
|
||||
'hour' => ':count hodina|:count hodiny|:count hodín',
|
||||
'a_hour' => 'hodina|:count hodiny|:count hodín',
|
||||
'h' => ':count h',
|
||||
'minute' => 'minútu|:count minúty|:count minút',
|
||||
'minute' => ':count minúta|:count minúty|:count minút',
|
||||
'a_minute' => 'minúta|:count minúty|:count minút',
|
||||
'min' => ':count min',
|
||||
'second' => 'sekundu|:count sekundy|:count sekúnd',
|
||||
'second' => ':count sekunda|:count sekundy|:count sekúnd',
|
||||
'a_second' => 'sekunda|:count sekundy|:count sekúnd',
|
||||
's' => ':count s',
|
||||
'ago' => 'pred :time',
|
||||
'from_now' => 'za :time',
|
||||
'after' => 'o :time neskôr',
|
||||
'before' => ':time predtým',
|
||||
'year_ago' => 'rokom|:count rokmi|:count rokmi',
|
||||
'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi',
|
||||
'week_ago' => 'týždňom|:count týždňami|:count týždňami',
|
||||
'day_ago' => 'dňom|:count dňami|:count dňami',
|
||||
'hour_ago' => 'hodinou|:count hodinami|:count hodinami',
|
||||
'minute_ago' => 'minútou|:count minútami|:count minútami',
|
||||
'second_ago' => 'sekundou|:count sekundami|:count sekundami',
|
||||
'millisecond' => ':count milisekunda|:count milisekundy|:count milisekúnd',
|
||||
'a_millisecond' => 'milisekunda|:count milisekundy|:count milisekúnd',
|
||||
'ms' => ':count ms',
|
||||
'microsecond' => ':count mikrosekunda|:count mikrosekundy|:count mikrosekúnd',
|
||||
'a_microsecond' => 'mikrosekunda|:count mikrosekundy|:count mikrosekúnd',
|
||||
'µs' => ':count µs',
|
||||
|
||||
'ago' => $ago,
|
||||
'from_now' => $fromNow,
|
||||
'before' => ':time pred',
|
||||
'after' => ':time po',
|
||||
|
||||
'hour_after' => ':count hodinu|:count hodiny|:count hodín',
|
||||
'minute_after' => ':count minútu|:count minúty|:count minút',
|
||||
'second_after' => ':count sekundu|:count sekundy|:count sekúnd',
|
||||
|
||||
'hour_before' => ':count hodinu|:count hodiny|:count hodín',
|
||||
'minute_before' => ':count minútu|:count minúty|:count minút',
|
||||
'second_before' => ':count sekundu|:count sekundy|:count sekúnd',
|
||||
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 4,
|
||||
'list' => [', ', ' a '],
|
||||
@@ -72,8 +128,26 @@ return [
|
||||
'LLL' => 'D. M. HH:mm',
|
||||
'LLLL' => 'dddd D. MMMM YYYY HH:mm',
|
||||
],
|
||||
'calendar' => [
|
||||
'sameDay' => '[dnes o] LT',
|
||||
'nextDay' => '[zajtra o] LT',
|
||||
'lastDay' => '[včera o] LT',
|
||||
'nextWeek' => 'dddd [o] LT',
|
||||
'lastWeek' => static function (CarbonInterface $date) {
|
||||
switch ($date->dayOfWeek) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
case 5:
|
||||
return '[minulý] dddd [o] LT'; //pondelok/utorok/štvrtok/piatok
|
||||
default:
|
||||
return '[minulá] dddd [o] LT';
|
||||
}
|
||||
},
|
||||
'sameElse' => 'L',
|
||||
],
|
||||
'weekdays' => ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'],
|
||||
'weekdays_short' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'],
|
||||
'weekdays_short' => ['ned', 'pon', 'uto', 'str', 'štv', 'pia', 'sob'],
|
||||
'weekdays_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'],
|
||||
'months' => ['január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december'],
|
||||
'months_short' => ['jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
||||
|
||||
6
vendor/nesbot/carbon/src/Carbon/Lang/sl.php
vendored
6
vendor/nesbot/carbon/src/Carbon/Lang/sl.php
vendored
@@ -49,9 +49,9 @@ return [
|
||||
'a_second' => '{1}nekaj sekund|:count sekunda|:count sekundi|:count sekunde|:count sekund',
|
||||
's' => ':count s',
|
||||
|
||||
'year_ago' => ':count letom|:count leti|:count leti|:count leti',
|
||||
'y_ago' => ':count letom|:count leti|:count leti|:count leti',
|
||||
'month_ago' => ':count mesecem|:count meseci|:count meseci|:count meseci',
|
||||
'year_ago' => ':count letom|:count letoma|:count leti|:count leti',
|
||||
'y_ago' => ':count letom|:count letoma|:count leti|:count leti',
|
||||
'month_ago' => ':count mesecem|:count mesecema|:count meseci|:count meseci',
|
||||
'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni',
|
||||
'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi',
|
||||
'd_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi',
|
||||
|
||||
22
vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php
vendored
22
vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php
vendored
@@ -24,28 +24,28 @@
|
||||
use Carbon\CarbonInterface;
|
||||
|
||||
return [
|
||||
'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година',
|
||||
'year' => ':count година|:count године|:count година',
|
||||
'y' => ':count г.',
|
||||
'month' => '{1}:count месец|{2,3,4}:count месеца|[0,Inf[:count месеци',
|
||||
'month' => ':count месец|:count месеца|:count месеци',
|
||||
'm' => ':count м.',
|
||||
'week' => '{1}:count недеља|{2,3,4}:count недеље|[0,Inf[:count недеља',
|
||||
'week' => ':count недеља|:count недеље|:count недеља',
|
||||
'w' => ':count нед.',
|
||||
'day' => '{1,21,31}:count дан|[0,Inf[:count дана',
|
||||
'day' => ':count дан|:count дана|:count дана',
|
||||
'd' => ':count д.',
|
||||
'hour' => '{1,21}:count сат|{2,3,4,22,23,24}:count сата|[0,Inf[:count сати',
|
||||
'hour' => ':count сат|:count сата|:count сати',
|
||||
'h' => ':count ч.',
|
||||
'minute' => '{1,21,31,41,51}:count минут|[0,Inf[:count минута',
|
||||
'minute' => ':count минут|:count минута|:count минута',
|
||||
'min' => ':count мин.',
|
||||
'second' => '{1,21,31,41,51}:count секунд|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count секунде|[0,Inf[:count секунди',
|
||||
'second' => ':count секунд|:count секунде|:count секунди',
|
||||
's' => ':count сек.',
|
||||
'ago' => 'пре :time',
|
||||
'from_now' => 'за :time',
|
||||
'after' => ':time након',
|
||||
'before' => ':time пре',
|
||||
'year_from_now' => '{1,21,31,41,51}:count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година',
|
||||
'year_ago' => '{1,21,31,41,51}:count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година',
|
||||
'week_from_now' => '{1}:count недељу|{2,3,4}:count недеље|[0,Inf[:count недеља',
|
||||
'week_ago' => '{1}:count недељу|{2,3,4}:count недеље|[0,Inf[:count недеља',
|
||||
'year_from_now' => ':count годину|:count године|:count година',
|
||||
'year_ago' => ':count годину|:count године|:count година',
|
||||
'week_from_now' => ':count недељу|:count недеље|:count недеља',
|
||||
'week_ago' => ':count недељу|:count недеље|:count недеља',
|
||||
'diff_now' => 'управо сада',
|
||||
'diff_today' => 'данас',
|
||||
'diff_today_regexp' => 'данас(?:\\s+у)?',
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (class_exists(PluralizationRules::class)) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return PluralizationRules::get($number, 'sr');
|
||||
}, 'sr_Cyrl_BA');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return array_replace_recursive(require __DIR__.'/sr_Cyrl.php', [
|
||||
'formats' => [
|
||||
'LT' => 'HH:mm',
|
||||
|
||||
@@ -16,32 +16,41 @@
|
||||
*/
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (class_exists(PluralizationRules::class)) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return PluralizationRules::get($number, 'sr');
|
||||
}, 'sr_Cyrl_ME');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return [
|
||||
'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година',
|
||||
'year' => ':count година|:count године|:count година',
|
||||
'y' => ':count г.',
|
||||
'month' => '{1}:count мјесец|{2,3,4}:count мјесеца|[0,Inf[:count мјесеци',
|
||||
'month' => ':count мјесец|:count мјесеца|:count мјесеци',
|
||||
'm' => ':count мј.',
|
||||
'week' => '{1}:count недјеља|{2,3,4}:count недјеље|[0,Inf[:count недјеља',
|
||||
'week' => ':count недјеља|:count недјеље|:count недјеља',
|
||||
'w' => ':count нед.',
|
||||
'day' => '{1,21,31}:count дан|[0,Inf[:count дана',
|
||||
'day' => ':count дан|:count дана|:count дана',
|
||||
'd' => ':count д.',
|
||||
'hour' => '{1,21}:count сат|{2,3,4,22,23,24}:count сата|[0,Inf[:count сати',
|
||||
'hour' => ':count сат|:count сата|:count сати',
|
||||
'h' => ':count ч.',
|
||||
'minute' => '{1,21,31,41,51}:count минут|[0,Inf[:count минута',
|
||||
'minute' => ':count минут|:count минута|:count минута',
|
||||
'min' => ':count мин.',
|
||||
'second' => '{1,21,31,41,51}:count секунд|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count секунде|[0,Inf[:count секунди',
|
||||
'second' => ':count секунд|:count секунде|:count секунди',
|
||||
's' => ':count сек.',
|
||||
'ago' => 'прије :time',
|
||||
'from_now' => 'за :time',
|
||||
'after' => ':time након',
|
||||
'before' => ':time прије',
|
||||
|
||||
'year_from_now' => '{1,21,31,41,51}:count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година',
|
||||
'year_ago' => '{1,21,31,41,51}:count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година',
|
||||
'year_from_now' => ':count годину|:count године|:count година',
|
||||
'year_ago' => ':count годину|:count године|:count година',
|
||||
|
||||
'week_from_now' => '{1}:count недјељу|{2,3,4}:count недјеље|[0,Inf[:count недјеља',
|
||||
'week_ago' => '{1}:count недјељу|{2,3,4}:count недјеље|[0,Inf[:count недјеља',
|
||||
'week_from_now' => ':count недјељу|:count недјеље|:count недјеља',
|
||||
'week_ago' => ':count недјељу|:count недјеље|:count недјеља',
|
||||
|
||||
'diff_now' => 'управо сада',
|
||||
'diff_today' => 'данас',
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (class_exists(PluralizationRules::class)) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return PluralizationRules::get($number, 'sr');
|
||||
}, 'sr_Cyrl_XK');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return array_replace_recursive(require __DIR__.'/sr_Cyrl_BA.php', [
|
||||
'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'],
|
||||
]);
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (class_exists(PluralizationRules::class)) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return PluralizationRules::get($number, 'sr');
|
||||
}, 'sr_Latn_BA');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return array_replace_recursive(require __DIR__.'/sr_Latn.php', [
|
||||
'formats' => [
|
||||
'LT' => 'HH:mm',
|
||||
|
||||
@@ -16,6 +16,15 @@
|
||||
*/
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (class_exists(PluralizationRules::class)) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return PluralizationRules::get($number, 'sr');
|
||||
}, 'sr_Latn_ME');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return array_replace_recursive(require __DIR__.'/sr.php', [
|
||||
'month' => ':count mjesec|:count mjeseca|:count mjeseci',
|
||||
@@ -27,6 +36,7 @@ return array_replace_recursive(require __DIR__.'/sr.php', [
|
||||
'before' => ':time prije',
|
||||
'week_from_now' => ':count nedjelju|:count nedjelje|:count nedjelja',
|
||||
'week_ago' => ':count nedjelju|:count nedjelje|:count nedjelja',
|
||||
'second_ago' => ':count sekund|:count sekunde|:count sekundi',
|
||||
'diff_tomorrow' => 'sjutra',
|
||||
'calendar' => [
|
||||
'nextDay' => '[sjutra u] LT',
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (class_exists(PluralizationRules::class)) {
|
||||
PluralizationRules::set(static function ($number) {
|
||||
return PluralizationRules::get($number, 'sr');
|
||||
}, 'sr_Latn_XK');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return array_replace_recursive(require __DIR__.'/sr_Latn_BA.php', [
|
||||
'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'],
|
||||
]);
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/ss.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/ss.php
vendored
@@ -50,7 +50,7 @@ return [
|
||||
$lastDigit = $number % 10;
|
||||
|
||||
return $number.(
|
||||
(~~($number % 100 / 10) === 1) ? 'e' : (
|
||||
((int) ($number % 100 / 10) === 1) ? 'e' : (
|
||||
($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e'
|
||||
)
|
||||
);
|
||||
|
||||
2
vendor/nesbot/carbon/src/Carbon/Lang/sv.php
vendored
2
vendor/nesbot/carbon/src/Carbon/Lang/sv.php
vendored
@@ -70,7 +70,7 @@ return [
|
||||
$lastDigit = $number % 10;
|
||||
|
||||
return $number.(
|
||||
(~~($number % 100 / 10) === 1) ? 'e' : (
|
||||
((int) ($number % 100 / 10) === 1) ? 'e' : (
|
||||
($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e'
|
||||
)
|
||||
);
|
||||
|
||||
3
vendor/nesbot/carbon/src/Carbon/Lang/uk.php
vendored
3
vendor/nesbot/carbon/src/Carbon/Lang/uk.php
vendored
@@ -55,7 +55,7 @@ $processHoursFunction = function (CarbonInterface $date, string $format) {
|
||||
*/
|
||||
return [
|
||||
'year' => ':count рік|:count роки|:count років',
|
||||
'y' => ':countр',
|
||||
'y' => ':countр|:countрр|:countрр',
|
||||
'a_year' => '{1}рік|:count рік|:count роки|:count років',
|
||||
'month' => ':count місяць|:count місяці|:count місяців',
|
||||
'm' => ':countм',
|
||||
@@ -193,6 +193,7 @@ return [
|
||||
'genitive' => ['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи'],
|
||||
];
|
||||
|
||||
$format = $format ?? '';
|
||||
$nounCase = preg_match('/(\[(В|в|У|у)\])\s+dddd/u', $format)
|
||||
? 'accusative'
|
||||
: (
|
||||
|
||||
@@ -24,6 +24,22 @@ use Throwable;
|
||||
|
||||
class ServiceProvider extends \Illuminate\Support\ServiceProvider
|
||||
{
|
||||
/** @var callable|null */
|
||||
protected $appGetter = null;
|
||||
|
||||
/** @var callable|null */
|
||||
protected $localeGetter = null;
|
||||
|
||||
public function setAppGetter(?callable $appGetter): void
|
||||
{
|
||||
$this->appGetter = $appGetter;
|
||||
}
|
||||
|
||||
public function setLocaleGetter(?callable $localeGetter): void
|
||||
{
|
||||
$this->localeGetter = $localeGetter;
|
||||
}
|
||||
|
||||
public function boot()
|
||||
{
|
||||
$this->updateLocale();
|
||||
@@ -44,8 +60,12 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider
|
||||
|
||||
public function updateLocale()
|
||||
{
|
||||
$app = $this->app && method_exists($this->app, 'getLocale') ? $this->app : app('translator');
|
||||
$locale = $app->getLocale();
|
||||
$locale = $this->getLocale();
|
||||
|
||||
if ($locale === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Carbon::setLocale($locale);
|
||||
CarbonImmutable::setLocale($locale);
|
||||
CarbonPeriod::setLocale($locale);
|
||||
@@ -70,6 +90,34 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider
|
||||
// Needed for Laravel < 5.3 compatibility
|
||||
}
|
||||
|
||||
protected function getLocale()
|
||||
{
|
||||
if ($this->localeGetter) {
|
||||
return ($this->localeGetter)();
|
||||
}
|
||||
|
||||
$app = $this->getApp();
|
||||
$app = $app && method_exists($app, 'getLocale')
|
||||
? $app
|
||||
: $this->getGlobalApp('translator');
|
||||
|
||||
return $app ? $app->getLocale() : null;
|
||||
}
|
||||
|
||||
protected function getApp()
|
||||
{
|
||||
if ($this->appGetter) {
|
||||
return ($this->appGetter)();
|
||||
}
|
||||
|
||||
return $this->app ?? $this->getGlobalApp();
|
||||
}
|
||||
|
||||
protected function getGlobalApp(...$args)
|
||||
{
|
||||
return \function_exists('app') ? \app(...$args) : null;
|
||||
}
|
||||
|
||||
protected function isEventDispatcher($instance)
|
||||
{
|
||||
return $instance instanceof EventDispatcher
|
||||
|
||||
@@ -14,6 +14,12 @@ declare(strict_types=1);
|
||||
namespace Carbon\PHPStan;
|
||||
|
||||
use Closure;
|
||||
use InvalidArgumentException;
|
||||
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter as AdapterReflectionParameter;
|
||||
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionType as AdapterReflectionType;
|
||||
use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass;
|
||||
use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction;
|
||||
use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter;
|
||||
use PHPStan\Reflection\Php\BuiltinMethodReflection;
|
||||
use PHPStan\TrinaryLogic;
|
||||
use ReflectionClass;
|
||||
@@ -64,24 +70,34 @@ abstract class AbstractMacro implements BuiltinMethodReflection
|
||||
/**
|
||||
* Macro constructor.
|
||||
*
|
||||
* @param string $className
|
||||
* @phpstan-param class-string $className
|
||||
*
|
||||
* @param string $methodName
|
||||
* @param callable $macro
|
||||
* @param class-string $className
|
||||
* @param string $methodName
|
||||
* @param callable $macro
|
||||
*/
|
||||
public function __construct(string $className, string $methodName, $macro)
|
||||
{
|
||||
$this->className = $className;
|
||||
$this->methodName = $methodName;
|
||||
$this->reflectionFunction = \is_array($macro)
|
||||
$rawReflectionFunction = \is_array($macro)
|
||||
? new ReflectionMethod($macro[0], $macro[1])
|
||||
: new ReflectionFunction($macro);
|
||||
$this->parameters = $this->reflectionFunction->getParameters();
|
||||
$this->reflectionFunction = self::hasModernParser()
|
||||
? $this->getReflectionFunction($macro)
|
||||
: $rawReflectionFunction; // @codeCoverageIgnore
|
||||
$this->parameters = array_map(
|
||||
function ($parameter) {
|
||||
if ($parameter instanceof BetterReflectionParameter) {
|
||||
return new AdapterReflectionParameter($parameter);
|
||||
}
|
||||
|
||||
if ($this->reflectionFunction->isClosure()) {
|
||||
return $parameter; // @codeCoverageIgnore
|
||||
},
|
||||
$this->reflectionFunction->getParameters()
|
||||
);
|
||||
|
||||
if ($rawReflectionFunction->isClosure()) {
|
||||
try {
|
||||
$closure = $this->reflectionFunction->getClosure();
|
||||
$closure = $rawReflectionFunction->getClosure();
|
||||
$boundClosure = Closure::bind($closure, new stdClass());
|
||||
$this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null);
|
||||
} catch (Throwable $e) {
|
||||
@@ -90,6 +106,31 @@ abstract class AbstractMacro implements BuiltinMethodReflection
|
||||
}
|
||||
}
|
||||
|
||||
private function getReflectionFunction($spec)
|
||||
{
|
||||
if (\is_array($spec) && \count($spec) === 2 && \is_string($spec[1])) {
|
||||
\assert($spec[1] !== '');
|
||||
|
||||
if (\is_object($spec[0])) {
|
||||
return BetterReflectionClass::createFromInstance($spec[0])
|
||||
->getMethod($spec[1]);
|
||||
}
|
||||
|
||||
return BetterReflectionClass::createFromName($spec[0])
|
||||
->getMethod($spec[1]);
|
||||
}
|
||||
|
||||
if (\is_string($spec)) {
|
||||
return BetterReflectionFunction::createFromName($spec);
|
||||
}
|
||||
|
||||
if ($spec instanceof Closure) {
|
||||
return BetterReflectionFunction::createFromClosure($spec);
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException('Could not create reflection from the spec given'); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -175,7 +216,13 @@ abstract class AbstractMacro implements BuiltinMethodReflection
|
||||
*/
|
||||
public function getReturnType(): ?ReflectionType
|
||||
{
|
||||
return $this->reflectionFunction->getReturnType();
|
||||
$type = $this->reflectionFunction->getReturnType();
|
||||
|
||||
if ($type instanceof ReflectionType) {
|
||||
return $type; // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
return self::adaptType($type);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -205,18 +252,35 @@ abstract class AbstractMacro implements BuiltinMethodReflection
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getReflection(): ?ReflectionMethod
|
||||
{
|
||||
return $this->reflectionFunction instanceof ReflectionMethod
|
||||
? $this->reflectionFunction
|
||||
: null;
|
||||
}
|
||||
|
||||
public function getTentativeReturnType(): ?ReflectionType
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function returnsByReference(): TrinaryLogic
|
||||
{
|
||||
return TrinaryLogic::createNo();
|
||||
}
|
||||
|
||||
private static function adaptType($type)
|
||||
{
|
||||
$method = method_exists(AdapterReflectionType::class, 'fromTypeOrNull')
|
||||
? 'fromTypeOrNull'
|
||||
: 'fromReturnTypeOrNull'; // @codeCoverageIgnore
|
||||
|
||||
return AdapterReflectionType::$method($type);
|
||||
}
|
||||
|
||||
private static function hasModernParser(): bool
|
||||
{
|
||||
static $modernParser = null;
|
||||
|
||||
if ($modernParser !== null) {
|
||||
return $modernParser;
|
||||
}
|
||||
|
||||
$modernParser = method_exists(AdapterReflectionType::class, 'fromTypeOrNull');
|
||||
|
||||
return $modernParser;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace Carbon\PHPStan;
|
||||
|
||||
use PHPStan\BetterReflection\Reflection\Adapter;
|
||||
use PHPStan\Reflection\Php\BuiltinMethodReflection;
|
||||
use ReflectionMethod;
|
||||
|
||||
$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection');
|
||||
|
||||
require $method->hasReturnType() && $method->getReturnType()->getName() === Adapter\ReflectionMethod::class
|
||||
? __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroStatic.php'
|
||||
: __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroBuiltin.php';
|
||||
|
||||
$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName');
|
||||
|
||||
require $method->hasReturnType()
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
|
||||
namespace Carbon\PHPStan;
|
||||
|
||||
use PHPStan\Reflection\Assertions;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Reflection\MethodReflection;
|
||||
use PHPStan\Reflection\MethodsClassReflectionExtension;
|
||||
use PHPStan\Reflection\Php\PhpMethodReflectionFactory;
|
||||
use PHPStan\Reflection\ReflectionProvider;
|
||||
use PHPStan\Type\TypehintHelper;
|
||||
|
||||
/**
|
||||
@@ -38,10 +40,13 @@ final class MacroExtension implements MethodsClassReflectionExtension
|
||||
* Extension constructor.
|
||||
*
|
||||
* @param PhpMethodReflectionFactory $methodReflectionFactory
|
||||
* @param ReflectionProvider $reflectionProvider
|
||||
*/
|
||||
public function __construct(PhpMethodReflectionFactory $methodReflectionFactory)
|
||||
{
|
||||
$this->scanner = new MacroScanner();
|
||||
public function __construct(
|
||||
PhpMethodReflectionFactory $methodReflectionFactory,
|
||||
ReflectionProvider $reflectionProvider
|
||||
) {
|
||||
$this->scanner = new MacroScanner($reflectionProvider);
|
||||
$this->methodReflectionFactory = $methodReflectionFactory;
|
||||
}
|
||||
|
||||
@@ -59,6 +64,7 @@ final class MacroExtension implements MethodsClassReflectionExtension
|
||||
public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection
|
||||
{
|
||||
$builtinMacro = $this->scanner->getMethod($classReflection->getName(), $methodName);
|
||||
$supportAssertions = class_exists(Assertions::class);
|
||||
|
||||
return $this->methodReflectionFactory->create(
|
||||
$classReflection,
|
||||
@@ -72,7 +78,11 @@ final class MacroExtension implements MethodsClassReflectionExtension
|
||||
$builtinMacro->isDeprecated()->yes(),
|
||||
$builtinMacro->isInternal(),
|
||||
$builtinMacro->isFinal(),
|
||||
$builtinMacro->getDocComment()
|
||||
$supportAssertions ? null : $builtinMacro->getDocComment(),
|
||||
$supportAssertions ? Assertions::createEmpty() : null,
|
||||
null,
|
||||
$builtinMacro->getDocComment(),
|
||||
[]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,35 +12,55 @@
|
||||
namespace Carbon\PHPStan;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use PHPStan\Reflection\ReflectionProvider;
|
||||
use ReflectionClass;
|
||||
use ReflectionException;
|
||||
|
||||
final class MacroScanner
|
||||
{
|
||||
/**
|
||||
* @var \PHPStan\Reflection\ReflectionProvider
|
||||
*/
|
||||
private $reflectionProvider;
|
||||
|
||||
/**
|
||||
* MacroScanner constructor.
|
||||
*
|
||||
* @param \PHPStan\Reflection\ReflectionProvider $reflectionProvider
|
||||
*/
|
||||
public function __construct(ReflectionProvider $reflectionProvider)
|
||||
{
|
||||
$this->reflectionProvider = $reflectionProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the given pair class-method is a Carbon macro.
|
||||
*
|
||||
* @param string $className
|
||||
* @phpstan-param class-string $className
|
||||
*
|
||||
* @param string $methodName
|
||||
* @param class-string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasMethod(string $className, string $methodName): bool
|
||||
{
|
||||
return is_a($className, CarbonInterface::class, true) &&
|
||||
\is_callable([$className, 'hasMacro']) &&
|
||||
$classReflection = $this->reflectionProvider->getClass($className);
|
||||
|
||||
if (
|
||||
$classReflection->getName() !== CarbonInterface::class &&
|
||||
!$classReflection->isSubclassOf(CarbonInterface::class)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return \is_callable([$className, 'hasMacro']) &&
|
||||
$className::hasMacro($methodName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Macro for a given pair class-method.
|
||||
*
|
||||
* @param string $className
|
||||
* @phpstan-param class-string $className
|
||||
*
|
||||
* @param string $methodName
|
||||
* @param class-string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @throws ReflectionException
|
||||
*
|
||||
|
||||
@@ -75,6 +75,9 @@ trait Comparison
|
||||
*/
|
||||
public function equalTo($date): bool
|
||||
{
|
||||
$this->discourageNull($date);
|
||||
$this->discourageBoolean($date);
|
||||
|
||||
return $this == $this->resolveCarbon($date);
|
||||
}
|
||||
|
||||
@@ -155,6 +158,9 @@ trait Comparison
|
||||
*/
|
||||
public function greaterThan($date): bool
|
||||
{
|
||||
$this->discourageNull($date);
|
||||
$this->discourageBoolean($date);
|
||||
|
||||
return $this > $this->resolveCarbon($date);
|
||||
}
|
||||
|
||||
@@ -216,7 +222,10 @@ trait Comparison
|
||||
*/
|
||||
public function greaterThanOrEqualTo($date): bool
|
||||
{
|
||||
return $this >= $date;
|
||||
$this->discourageNull($date);
|
||||
$this->discourageBoolean($date);
|
||||
|
||||
return $this >= $this->resolveCarbon($date);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -256,6 +265,9 @@ trait Comparison
|
||||
*/
|
||||
public function lessThan($date): bool
|
||||
{
|
||||
$this->discourageNull($date);
|
||||
$this->discourageBoolean($date);
|
||||
|
||||
return $this < $this->resolveCarbon($date);
|
||||
}
|
||||
|
||||
@@ -317,7 +329,10 @@ trait Comparison
|
||||
*/
|
||||
public function lessThanOrEqualTo($date): bool
|
||||
{
|
||||
return $this <= $date;
|
||||
$this->discourageNull($date);
|
||||
$this->discourageBoolean($date);
|
||||
|
||||
return $this <= $this->resolveCarbon($date);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -351,10 +366,10 @@ trait Comparison
|
||||
}
|
||||
|
||||
if ($equal) {
|
||||
return $this->greaterThanOrEqualTo($date1) && $this->lessThanOrEqualTo($date2);
|
||||
return $this >= $date1 && $this <= $date2;
|
||||
}
|
||||
|
||||
return $this->greaterThan($date1) && $this->lessThan($date2);
|
||||
return $this > $date1 && $this < $date2;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -448,7 +463,7 @@ trait Comparison
|
||||
*/
|
||||
public function isWeekend()
|
||||
{
|
||||
return \in_array($this->dayOfWeek, static::$weekendDays);
|
||||
return \in_array($this->dayOfWeek, static::$weekendDays, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -548,12 +563,17 @@ trait Comparison
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the instance is a long year
|
||||
* Determines if the instance is a long year (using calendar year).
|
||||
*
|
||||
* ⚠️ This method completely ignores month and day to use the numeric year number,
|
||||
* it's not correct if the exact date matters. For instance as `2019-12-30` is already
|
||||
* in the first week of the 2020 year, if you want to know from this date if ISO week
|
||||
* year 2020 is a long year, use `isLongIsoYear` instead.
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* Carbon::parse('2015-01-01')->isLongYear(); // true
|
||||
* Carbon::parse('2016-01-01')->isLongYear(); // false
|
||||
* Carbon::create(2015)->isLongYear(); // true
|
||||
* Carbon::create(2016)->isLongYear(); // false
|
||||
* ```
|
||||
*
|
||||
* @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates
|
||||
@@ -565,6 +585,27 @@ trait Comparison
|
||||
return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the instance is a long year (using ISO 8601 year).
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* Carbon::parse('2015-01-01')->isLongIsoYear(); // true
|
||||
* Carbon::parse('2016-01-01')->isLongIsoYear(); // true
|
||||
* Carbon::parse('2016-01-03')->isLongIsoYear(); // false
|
||||
* Carbon::parse('2019-12-29')->isLongIsoYear(); // false
|
||||
* Carbon::parse('2019-12-30')->isLongIsoYear(); // true
|
||||
* ```
|
||||
*
|
||||
* @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isLongIsoYear()
|
||||
{
|
||||
return static::create($this->isoWeekYear, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares the formatted values of the two dates.
|
||||
*
|
||||
@@ -621,19 +662,19 @@ trait Comparison
|
||||
'microsecond' => 'Y-m-d H:i:s.u',
|
||||
];
|
||||
|
||||
if (!isset($units[$unit])) {
|
||||
if (isset($this->$unit)) {
|
||||
return $this->resolveCarbon($date)->$unit === $this->$unit;
|
||||
}
|
||||
|
||||
if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) {
|
||||
throw new BadComparisonUnitException($unit);
|
||||
}
|
||||
|
||||
return false;
|
||||
if (isset($units[$unit])) {
|
||||
return $this->isSameAs($units[$unit], $date);
|
||||
}
|
||||
|
||||
return $this->isSameAs($units[$unit], $date);
|
||||
if (isset($this->$unit)) {
|
||||
return $this->resolveCarbon($date)->$unit === $this->$unit;
|
||||
}
|
||||
|
||||
if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) {
|
||||
throw new BadComparisonUnitException($unit);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -981,12 +1022,12 @@ trait Comparison
|
||||
return $current->startOfMinute()->eq($other);
|
||||
}
|
||||
|
||||
if (preg_match('/\d(h|am|pm)$/', $tester)) {
|
||||
if (preg_match('/\d(?:h|am|pm)$/', $tester)) {
|
||||
return $current->startOfHour()->eq($other);
|
||||
}
|
||||
|
||||
if (preg_match(
|
||||
'/^(january|february|march|april|may|june|july|august|september|october|november|december)\s+\d+$/i',
|
||||
'/^(?:january|february|march|april|may|june|july|august|september|october|november|december)(?:\s+\d+)?$/i',
|
||||
$tester
|
||||
)) {
|
||||
return $current->startOfMonth()->eq($other->startOfMonth());
|
||||
@@ -1067,4 +1108,18 @@ trait Comparison
|
||||
{
|
||||
return $this->endOfTime ?? false;
|
||||
}
|
||||
|
||||
private function discourageNull($value): void
|
||||
{
|
||||
if ($value === null) {
|
||||
@trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
|
||||
private function discourageBoolean($value): void
|
||||
{
|
||||
if (\is_bool($value)) {
|
||||
@trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ use Carbon\CarbonImmutable;
|
||||
use Carbon\CarbonInterface;
|
||||
use Carbon\CarbonInterval;
|
||||
use Carbon\CarbonPeriod;
|
||||
use Carbon\CarbonPeriodImmutable;
|
||||
use Carbon\Exceptions\UnitException;
|
||||
use Closure;
|
||||
use DateTime;
|
||||
@@ -34,39 +35,7 @@ use ReturnTypeWillChange;
|
||||
*/
|
||||
trait Converter
|
||||
{
|
||||
/**
|
||||
* Format to use for __toString method when type juggling occurs.
|
||||
*
|
||||
* @var string|Closure|null
|
||||
*/
|
||||
protected static $toStringFormat;
|
||||
|
||||
/**
|
||||
* Reset the format used to the default when type juggling a Carbon instance to a string
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function resetToStringFormat()
|
||||
{
|
||||
static::setToStringFormat(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
* You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and
|
||||
* use other method or custom format passed to format() method if you need to dump an other string
|
||||
* format.
|
||||
*
|
||||
* Set the default format used when type juggling a Carbon instance to a string
|
||||
*
|
||||
* @param string|Closure|null $format
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function setToStringFormat($format)
|
||||
{
|
||||
static::$toStringFormat = $format;
|
||||
}
|
||||
use ToStringFormat;
|
||||
|
||||
/**
|
||||
* Returns the formatted date string on success or FALSE on failure.
|
||||
@@ -110,7 +79,7 @@ trait Converter
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* echo Carbon::now(); // Carbon instances can be casted to string
|
||||
* echo Carbon::now(); // Carbon instances can be cast to string
|
||||
* ```
|
||||
*
|
||||
* @return string
|
||||
@@ -158,6 +127,21 @@ trait Converter
|
||||
return $this->rawFormat('M j, Y');
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the instance with the day, and a readable date
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
* echo Carbon::now()->toFormattedDayDateString();
|
||||
* ```
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toFormattedDayDateString(): string
|
||||
{
|
||||
return $this->rawFormat('D, M j, Y');
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the instance as time
|
||||
*
|
||||
@@ -622,16 +606,18 @@ trait Converter
|
||||
$interval = CarbonInterval::make("$interval ".static::pluralUnit($unit));
|
||||
}
|
||||
|
||||
$period = (new CarbonPeriod())->setDateClass(static::class)->setStartDate($this);
|
||||
$period = ($this->isMutable() ? new CarbonPeriod() : new CarbonPeriodImmutable())
|
||||
->setDateClass(static::class)
|
||||
->setStartDate($this);
|
||||
|
||||
if ($interval) {
|
||||
$period->setDateInterval($interval);
|
||||
$period = $period->setDateInterval($interval);
|
||||
}
|
||||
|
||||
if (\is_int($end) || \is_string($end) && ctype_digit($end)) {
|
||||
$period->setRecurrences($end);
|
||||
if (\is_int($end) || (\is_string($end) && ctype_digit($end))) {
|
||||
$period = $period->setRecurrences($end);
|
||||
} elseif ($end) {
|
||||
$period->setEndDate($end);
|
||||
$period = $period->setEndDate($end);
|
||||
}
|
||||
|
||||
return $period;
|
||||
|
||||
@@ -19,6 +19,8 @@ use Carbon\Exceptions\InvalidFormatException;
|
||||
use Carbon\Exceptions\OutOfRangeException;
|
||||
use Carbon\Translator;
|
||||
use Closure;
|
||||
use DateMalformedStringException;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeInterface;
|
||||
use DateTimeZone;
|
||||
use Exception;
|
||||
@@ -79,8 +81,8 @@ trait Creator
|
||||
|
||||
// Work-around for PHP bug https://bugs.php.net/bug.php?id=67127
|
||||
if (!str_contains((string) .1, '.')) {
|
||||
$locale = setlocale(LC_NUMERIC, '0');
|
||||
setlocale(LC_NUMERIC, 'C');
|
||||
$locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore
|
||||
setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -92,7 +94,7 @@ trait Creator
|
||||
$this->constructedObjectId = spl_object_hash($this);
|
||||
|
||||
if (isset($locale)) {
|
||||
setlocale(LC_NUMERIC, $locale);
|
||||
setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
self::setLastErrors(parent::getLastErrors());
|
||||
@@ -112,7 +114,7 @@ trait Creator
|
||||
$safeTz = static::safeCreateDateTimeZone($tz);
|
||||
|
||||
if ($safeTz) {
|
||||
return $date->setTimezone($safeTz);
|
||||
return ($date instanceof DateTimeImmutable ? $date : clone $date)->setTimezone($safeTz);
|
||||
}
|
||||
|
||||
return $date;
|
||||
@@ -148,7 +150,7 @@ trait Creator
|
||||
|
||||
$instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone());
|
||||
|
||||
if ($date instanceof CarbonInterface || $date instanceof Options) {
|
||||
if ($date instanceof CarbonInterface) {
|
||||
$settings = $date->getSettings();
|
||||
|
||||
if (!$date->hasLocalTranslator()) {
|
||||
@@ -184,7 +186,13 @@ trait Creator
|
||||
try {
|
||||
return new static($time, $tz);
|
||||
} catch (Exception $exception) {
|
||||
$date = @static::now($tz)->change($time);
|
||||
// @codeCoverageIgnoreStart
|
||||
try {
|
||||
$date = @static::now($tz)->change($time);
|
||||
} catch (DateMalformedStringException $ignoredException) {
|
||||
$date = null;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
if (!$date) {
|
||||
throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception);
|
||||
@@ -354,13 +362,13 @@ trait Creator
|
||||
* If $hour is not null then the default values for $minute and $second
|
||||
* will be 0.
|
||||
*
|
||||
* @param int|null $year
|
||||
* @param int|null $month
|
||||
* @param int|null $day
|
||||
* @param int|null $hour
|
||||
* @param int|null $minute
|
||||
* @param int|null $second
|
||||
* @param DateTimeZone|string|null $tz
|
||||
* @param DateTimeInterface|int|null $year
|
||||
* @param int|null $month
|
||||
* @param int|null $day
|
||||
* @param int|null $hour
|
||||
* @param int|null $minute
|
||||
* @param int|null $second
|
||||
* @param DateTimeZone|string|null $tz
|
||||
*
|
||||
* @throws InvalidFormatException
|
||||
*
|
||||
@@ -368,7 +376,7 @@ trait Creator
|
||||
*/
|
||||
public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null)
|
||||
{
|
||||
if (\is_string($year) && !is_numeric($year) || $year instanceof DateTimeInterface) {
|
||||
if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) {
|
||||
return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null));
|
||||
}
|
||||
|
||||
@@ -634,6 +642,10 @@ trait Creator
|
||||
$time = preg_replace('/^(.*)(am|pm|AM|PM)(.*)$/U', '$1$3 $2', $time);
|
||||
}
|
||||
|
||||
if ($tz === false) {
|
||||
$tz = null;
|
||||
}
|
||||
|
||||
// First attempt to create an instance, so that error messages are based on the unmodified format.
|
||||
$date = self::createFromFormatAndTimezone($format, $time, $tz);
|
||||
$lastErrors = parent::getLastErrors();
|
||||
@@ -651,12 +663,14 @@ trait Creator
|
||||
$tz = clone $mock->getTimezone();
|
||||
}
|
||||
|
||||
// Set microseconds to zero to match behavior of DateTime::createFromFormat()
|
||||
// See https://bugs.php.net/bug.php?id=74332
|
||||
$mock = $mock->copy()->microsecond(0);
|
||||
$mock = $mock->copy();
|
||||
|
||||
// Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag.
|
||||
if (!preg_match("/{$nonEscaped}[!|]/", $format)) {
|
||||
if (preg_match('/[HhGgisvuB]/', $format)) {
|
||||
$mock = $mock->setTime(0, 0);
|
||||
}
|
||||
|
||||
$format = static::MOCK_DATETIME_FORMAT.' '.$format;
|
||||
$time = ($mock instanceof self ? $mock->rawFormat(static::MOCK_DATETIME_FORMAT) : $mock->format(static::MOCK_DATETIME_FORMAT)).' '.$time;
|
||||
}
|
||||
@@ -862,6 +876,19 @@ trait Creator
|
||||
*/
|
||||
public static function createFromLocaleFormat($format, $locale, $time, $tz = null)
|
||||
{
|
||||
$format = preg_replace_callback(
|
||||
'/(?:\\\\[a-zA-Z]|[bfkqCEJKQRV]){2,}/',
|
||||
static function (array $match) use ($locale): string {
|
||||
$word = str_replace('\\', '', $match[0]);
|
||||
$translatedWord = static::translateTimeString($word, $locale, 'en');
|
||||
|
||||
return $word === $translatedWord
|
||||
? $match[0]
|
||||
: preg_replace('/[a-zA-Z]/', '\\\\$0', $translatedWord);
|
||||
},
|
||||
$format
|
||||
);
|
||||
|
||||
return static::rawCreateFromFormat($format, static::translateTimeString($time, $locale, 'en'), $tz);
|
||||
}
|
||||
|
||||
@@ -907,9 +934,9 @@ trait Creator
|
||||
if (\is_string($var)) {
|
||||
$var = trim($var);
|
||||
|
||||
if (!preg_match('/^P[0-9T]/', $var) &&
|
||||
!preg_match('/^R[0-9]/', $var) &&
|
||||
preg_match('/[a-z0-9]/i', $var)
|
||||
if (!preg_match('/^P[\dT]/', $var) &&
|
||||
!preg_match('/^R\d/', $var) &&
|
||||
preg_match('/[a-z\d]/i', $var)
|
||||
) {
|
||||
$date = static::parse($var);
|
||||
}
|
||||
@@ -921,13 +948,20 @@ trait Creator
|
||||
/**
|
||||
* Set last errors.
|
||||
*
|
||||
* @param array $lastErrors
|
||||
* @param array|bool $lastErrors
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private static function setLastErrors(array $lastErrors)
|
||||
private static function setLastErrors($lastErrors)
|
||||
{
|
||||
static::$lastErrors = $lastErrors;
|
||||
if (\is_array($lastErrors) || $lastErrors === false) {
|
||||
static::$lastErrors = \is_array($lastErrors) ? $lastErrors : [
|
||||
'warning_count' => 0,
|
||||
'warnings' => [],
|
||||
'error_count' => 0,
|
||||
'errors' => [],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
93
vendor/nesbot/carbon/src/Carbon/Traits/Date.php
vendored
93
vendor/nesbot/carbon/src/Carbon/Traits/Date.php
vendored
@@ -532,6 +532,7 @@ trait Date
|
||||
use Creator;
|
||||
use Difference;
|
||||
use Macro;
|
||||
use MagicParameter;
|
||||
use Modifiers;
|
||||
use Mutability;
|
||||
use ObjectInitialisation;
|
||||
@@ -641,9 +642,11 @@ trait Date
|
||||
/**
|
||||
* List of minimum and maximums for each unit.
|
||||
*
|
||||
* @param int $daysInMonth
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function getRangesByUnit()
|
||||
protected static function getRangesByUnit(int $daysInMonth = 31): array
|
||||
{
|
||||
return [
|
||||
// @call roundUnit
|
||||
@@ -651,7 +654,7 @@ trait Date
|
||||
// @call roundUnit
|
||||
'month' => [1, static::MONTHS_PER_YEAR],
|
||||
// @call roundUnit
|
||||
'day' => [1, 31],
|
||||
'day' => [1, $daysInMonth],
|
||||
// @call roundUnit
|
||||
'hour' => [0, static::HOURS_PER_DAY - 1],
|
||||
// @call roundUnit
|
||||
@@ -940,7 +943,7 @@ trait Date
|
||||
case $name === 'millisecond':
|
||||
// @property int
|
||||
case $name === 'milli':
|
||||
return (int) floor($this->rawFormat('u') / 1000);
|
||||
return (int) floor(((int) $this->rawFormat('u')) / 1000);
|
||||
|
||||
// @property int 1 through 53
|
||||
case $name === 'week':
|
||||
@@ -1250,7 +1253,7 @@ trait Date
|
||||
protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $subKey, $defaultValue)
|
||||
{
|
||||
$key = $baseKey.$keySuffix;
|
||||
$standaloneKey = "${key}_standalone";
|
||||
$standaloneKey = "{$key}_standalone";
|
||||
$baseTranslation = $this->getTranslationMessage($key);
|
||||
|
||||
if ($baseTranslation instanceof Closure) {
|
||||
@@ -1259,7 +1262,7 @@ trait Date
|
||||
|
||||
if (
|
||||
$this->getTranslationMessage("$standaloneKey.$subKey") &&
|
||||
(!$context || ($regExp = $this->getTranslationMessage("${baseKey}_regexp")) && !preg_match($regExp, $context))
|
||||
(!$context || (($regExp = $this->getTranslationMessage("{$baseKey}_regexp")) && !preg_match($regExp, $context)))
|
||||
) {
|
||||
$key = $standaloneKey;
|
||||
}
|
||||
@@ -1354,9 +1357,14 @@ trait Date
|
||||
*/
|
||||
public function weekday($value = null)
|
||||
{
|
||||
$dayOfWeek = ($this->dayOfWeek + 7 - (int) ($this->getTranslationMessage('first_day_of_week') ?? 0)) % 7;
|
||||
if ($value === null) {
|
||||
return $this->dayOfWeek;
|
||||
}
|
||||
|
||||
return $value === null ? $dayOfWeek : $this->addDays($value - $dayOfWeek);
|
||||
$firstDay = (int) ($this->getTranslationMessage('first_day_of_week') ?? 0);
|
||||
$dayOfWeek = ($this->dayOfWeek + 7 - $firstDay) % 7;
|
||||
|
||||
return $this->addDays((($value + 7 - $firstDay) % 7) - $dayOfWeek);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1373,6 +1381,39 @@ trait Date
|
||||
return $value === null ? $dayOfWeekIso : $this->addDays($value - $dayOfWeekIso);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of days since the start of the week (using the current locale or the first parameter
|
||||
* if explicitly given).
|
||||
*
|
||||
* @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week,
|
||||
* if not provided, start of week is inferred from the locale
|
||||
* (Sunday for en_US, Monday for de_DE, etc.)
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDaysFromStartOfWeek(int $weekStartsAt = null): int
|
||||
{
|
||||
$firstDay = (int) ($weekStartsAt ?? $this->getTranslationMessage('first_day_of_week') ?? 0);
|
||||
|
||||
return ($this->dayOfWeek + 7 - $firstDay) % 7;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the day (keeping the current time) to the start of the week + the number of days passed as the first
|
||||
* parameter. First day of week is driven by the locale unless explicitly set with the second parameter.
|
||||
*
|
||||
* @param int $numberOfDays number of days to add after the start of the current week
|
||||
* @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week,
|
||||
* if not provided, start of week is inferred from the locale
|
||||
* (Sunday for en_US, Monday for de_DE, etc.)
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setDaysFromStartOfWeek(int $numberOfDays, int $weekStartsAt = null)
|
||||
{
|
||||
return $this->addDays($numberOfDays - $this->getDaysFromStartOfWeek($weekStartsAt));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set any unit to a new value without overflowing current other unit given.
|
||||
*
|
||||
@@ -1848,9 +1889,18 @@ trait Date
|
||||
$format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
$formatted = strftime($format, strtotime($this->toDateTimeString()));
|
||||
$time = strtotime($this->toDateTimeString());
|
||||
$formatted = ($this->localStrictModeEnabled ?? static::isStrictModeEnabled())
|
||||
? strftime($format, $time)
|
||||
: @strftime($format, $time);
|
||||
|
||||
return static::$utf8 ? utf8_encode($formatted) : $formatted;
|
||||
return static::$utf8
|
||||
? (
|
||||
\function_exists('mb_convert_encoding')
|
||||
? mb_convert_encoding($formatted, 'UTF-8', mb_list_encodings())
|
||||
: utf8_encode($formatted)
|
||||
)
|
||||
: $formatted;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1869,6 +1919,10 @@ trait Date
|
||||
'LL' => $this->getTranslationMessage('formats.LL', $locale, 'MMMM D, YYYY'),
|
||||
'LLL' => $this->getTranslationMessage('formats.LLL', $locale, 'MMMM D, YYYY h:mm A'),
|
||||
'LLLL' => $this->getTranslationMessage('formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'),
|
||||
'l' => $this->getTranslationMessage('formats.l', $locale),
|
||||
'll' => $this->getTranslationMessage('formats.ll', $locale),
|
||||
'lll' => $this->getTranslationMessage('formats.lll', $locale),
|
||||
'llll' => $this->getTranslationMessage('formats.llll', $locale),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2152,7 +2206,7 @@ trait Date
|
||||
|
||||
$input = mb_substr($format, $i);
|
||||
|
||||
if (preg_match('/^(LTS|LT|[Ll]{1,4})/', $input, $match)) {
|
||||
if (preg_match('/^(LTS|LT|l{1,4}|L{1,4})/', $input, $match)) {
|
||||
if ($formats === null) {
|
||||
$formats = $this->getIsoFormats();
|
||||
}
|
||||
@@ -2256,6 +2310,7 @@ trait Date
|
||||
'c' => true,
|
||||
'r' => true,
|
||||
'U' => true,
|
||||
'T' => true,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2359,7 +2414,7 @@ trait Date
|
||||
$symbol = $second < 0 ? '-' : '+';
|
||||
$minute = abs($second) / static::SECONDS_PER_MINUTE;
|
||||
$hour = str_pad((string) floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT);
|
||||
$minute = str_pad((string) ($minute % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT);
|
||||
$minute = str_pad((string) (((int) $minute) % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT);
|
||||
|
||||
return "$symbol$hour$separator$minute";
|
||||
}
|
||||
@@ -2479,7 +2534,7 @@ trait Date
|
||||
return 'millennia';
|
||||
}
|
||||
|
||||
return "${unit}s";
|
||||
return "{$unit}s";
|
||||
}
|
||||
|
||||
protected function executeCallable($macro, ...$parameters)
|
||||
@@ -2566,7 +2621,7 @@ trait Date
|
||||
if (str_starts_with($unit, 'is')) {
|
||||
$word = substr($unit, 2);
|
||||
|
||||
if (\in_array($word, static::$days)) {
|
||||
if (\in_array($word, static::$days, true)) {
|
||||
return $this->isDayOfWeek($word);
|
||||
}
|
||||
|
||||
@@ -2594,7 +2649,7 @@ trait Date
|
||||
$unit = strtolower(substr($unit, 3));
|
||||
}
|
||||
|
||||
if (\in_array($unit, static::$units)) {
|
||||
if (\in_array($unit, static::$units, true)) {
|
||||
return $this->setUnit($unit, ...$parameters);
|
||||
}
|
||||
|
||||
@@ -2604,7 +2659,7 @@ trait Date
|
||||
if (str_starts_with($unit, 'Real')) {
|
||||
$unit = static::singularUnit(substr($unit, 4));
|
||||
|
||||
return $this->{"${action}RealUnit"}($unit, ...$parameters);
|
||||
return $this->{"{$action}RealUnit"}($unit, ...$parameters);
|
||||
}
|
||||
|
||||
if (preg_match('/^(Month|Quarter|Year|Decade|Century|Centurie|Millennium|Millennia)s?(No|With|Without|WithNo)Overflow$/', $unit, $match)) {
|
||||
@@ -2616,7 +2671,7 @@ trait Date
|
||||
}
|
||||
|
||||
if (static::isModifiableUnit($unit)) {
|
||||
return $this->{"${action}Unit"}($unit, $parameters[0] ?? 1, $overflow);
|
||||
return $this->{"{$action}Unit"}($unit, $this->getMagicParameter($parameters, 0, 'value', 1), $overflow);
|
||||
}
|
||||
|
||||
$sixFirstLetters = substr($unit, 0, 6);
|
||||
@@ -2655,7 +2710,11 @@ trait Date
|
||||
try {
|
||||
$unit = static::singularUnit(substr($method, 0, -5));
|
||||
|
||||
return $this->range($parameters[0] ?? $this, $parameters[1] ?? 1, $unit);
|
||||
return $this->range(
|
||||
$this->getMagicParameter($parameters, 0, 'endDate', $this),
|
||||
$this->getMagicParameter($parameters, 1, 'factor', 1),
|
||||
$unit
|
||||
);
|
||||
} catch (InvalidArgumentException $exception) {
|
||||
// Try macros
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user