Sub one millennium to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMillenniaWithoutOverflow(int|float $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaWithoutOverflow(int|float $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniaWithNoOverflow(int|float $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaWithNoOverflow(int|float $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniaNoOverflow(int|float $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaNoOverflow(int|float $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturies(int|float $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addCentury() Add one century to the instance (using date interval). * @method CarbonInterface subCenturies(int|float $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). * @method CarbonInterface addCenturiesWithOverflow(int|float $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subCenturiesWithOverflow(int|float $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addCenturiesWithoutOverflow(int|float $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesWithoutOverflow(int|float $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturiesWithNoOverflow(int|float $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesWithNoOverflow(int|float $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturiesNoOverflow(int|float $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesNoOverflow(int|float $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecades(int|float $value = 1) Add decades (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). * @method CarbonInterface subDecades(int|float $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). * @method CarbonInterface addDecadesWithOverflow(int|float $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subDecadesWithOverflow(int|float $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addDecadesWithoutOverflow(int|float $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesWithoutOverflow(int|float $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadesWithNoOverflow(int|float $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesWithNoOverflow(int|float $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadesNoOverflow(int|float $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesNoOverflow(int|float $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarters(int|float $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). * @method CarbonInterface subQuarters(int|float $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). * @method CarbonInterface addQuartersWithOverflow(int|float $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subQuartersWithOverflow(int|float $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addQuartersWithoutOverflow(int|float $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersWithoutOverflow(int|float $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuartersWithNoOverflow(int|float $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersWithNoOverflow(int|float $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuartersNoOverflow(int|float $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersNoOverflow(int|float $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addWeeks(int|float $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addWeek() Add one week to the instance (using date interval). * @method CarbonInterface subWeeks(int|float $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). * @method CarbonInterface addWeekdays(int|float $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). * @method CarbonInterface subWeekdays(int|float $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). * @method CarbonInterface addUTCMicros(int|float $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCMicro() Add one microsecond to the instance (using timestamp). * @method CarbonInterface subUTCMicros(int|float $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCMicro() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsUntil($endDate = null, int|float $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 float diffInUTCMicros(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of microseconds. * @method CarbonInterface addUTCMicroseconds(int|float $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCMicrosecond() Add one microsecond to the instance (using timestamp). * @method CarbonInterface subUTCMicroseconds(int|float $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCMicrosecond() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsecondsUntil($endDate = null, int|float $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 float diffInUTCMicroseconds(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of microseconds. * @method CarbonInterface addUTCMillis(int|float $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCMilli() Add one millisecond to the instance (using timestamp). * @method CarbonInterface subUTCMillis(int|float $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCMilli() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisUntil($endDate = null, int|float $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 float diffInUTCMillis(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of milliseconds. * @method CarbonInterface addUTCMilliseconds(int|float $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCMillisecond() Add one millisecond to the instance (using timestamp). * @method CarbonInterface subUTCMilliseconds(int|float $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCMillisecond() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisecondsUntil($endDate = null, int|float $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 float diffInUTCMilliseconds(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of milliseconds. * @method CarbonInterface addUTCSeconds(int|float $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCSecond() Add one second to the instance (using timestamp). * @method CarbonInterface subUTCSeconds(int|float $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCSecond() Sub one second to the instance (using timestamp). * @method CarbonPeriod secondsUntil($endDate = null, int|float $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 float diffInUTCSeconds(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of seconds. * @method CarbonInterface addUTCMinutes(int|float $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCMinute() Add one minute to the instance (using timestamp). * @method CarbonInterface subUTCMinutes(int|float $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCMinute() Sub one minute to the instance (using timestamp). * @method CarbonPeriod minutesUntil($endDate = null, int|float $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 float diffInUTCMinutes(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of minutes. * @method CarbonInterface addUTCHours(int|float $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCHour() Add one hour to the instance (using timestamp). * @method CarbonInterface subUTCHours(int|float $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCHour() Sub one hour to the instance (using timestamp). * @method CarbonPeriod hoursUntil($endDate = null, int|float $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 float diffInUTCHours(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of hours. * @method CarbonInterface addUTCDays(int|float $value = 1) Add days (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCDay() Add one day to the instance (using timestamp). * @method CarbonInterface subUTCDays(int|float $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCDay() Sub one day to the instance (using timestamp). * @method CarbonPeriod daysUntil($endDate = null, int|float $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 float diffInUTCDays(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of days. * @method CarbonInterface addUTCWeeks(int|float $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCWeek() Add one week to the instance (using timestamp). * @method CarbonInterface subUTCWeeks(int|float $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCWeek() Sub one week to the instance (using timestamp). * @method CarbonPeriod weeksUntil($endDate = null, int|float $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 float diffInUTCWeeks(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of weeks. * @method CarbonInterface addUTCMonths(int|float $value = 1) Add months (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCMonth() Add one month to the instance (using timestamp). * @method CarbonInterface subUTCMonths(int|float $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCMonth() Sub one month to the instance (using timestamp). * @method CarbonPeriod monthsUntil($endDate = null, int|float $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 float diffInUTCMonths(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of months. * @method CarbonInterface addUTCQuarters(int|float $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCQuarter() Add one quarter to the instance (using timestamp). * @method CarbonInterface subUTCQuarters(int|float $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCQuarter() Sub one quarter to the instance (using timestamp). * @method CarbonPeriod quartersUntil($endDate = null, int|float $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 float diffInUTCQuarters(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of quarters. * @method CarbonInterface addUTCYears(int|float $value = 1) Add years (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCYear() Add one year to the instance (using timestamp). * @method CarbonInterface subUTCYears(int|float $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCYear() Sub one year to the instance (using timestamp). * @method CarbonPeriod yearsUntil($endDate = null, int|float $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 float diffInUTCYears(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of years. * @method CarbonInterface addUTCDecades(int|float $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCDecade() Add one decade to the instance (using timestamp). * @method CarbonInterface subUTCDecades(int|float $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCDecade() Sub one decade to the instance (using timestamp). * @method CarbonPeriod decadesUntil($endDate = null, int|float $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 float diffInUTCDecades(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of decades. * @method CarbonInterface addUTCCenturies(int|float $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCCentury() Add one century to the instance (using timestamp). * @method CarbonInterface subUTCCenturies(int|float $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCCentury() Sub one century to the instance (using timestamp). * @method CarbonPeriod centuriesUntil($endDate = null, int|float $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 float diffInUTCCenturies(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of centuries. * @method CarbonInterface addUTCMillennia(int|float $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addUTCMillennium() Add one millennium to the instance (using timestamp). * @method CarbonInterface subUTCMillennia(int|float $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subUTCMillennium() Sub one millennium to the instance (using timestamp). * @method CarbonPeriod millenniaUntil($endDate = null, int|float $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 float diffInUTCMillennia(DateTimeInterface|string|null $date, bool $absolute = false) Convert current and given date in UTC timezone and return a floating number of millennia. * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. * @method CarbonInterface 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 int centuriesInMillennium() Return the number of centuries contained in the current millennium * @method int|static centuryOfMillennium(?int $century = null) Return the value of the century starting from the beginning of the current millennium when called with no parameters, change the current century when called with an integer value * @method int|static dayOfCentury(?int $day = null) Return the value of the day starting from the beginning of the current century when called with no parameters, change the current day when called with an integer value * @method int|static dayOfDecade(?int $day = null) Return the value of the day starting from the beginning of the current decade when called with no parameters, change the current day when called with an integer value * @method int|static dayOfMillennium(?int $day = null) Return the value of the day starting from the beginning of the current millennium when called with no parameters, change the current day when called with an integer value * @method int|static dayOfMonth(?int $day = null) Return the value of the day starting from the beginning of the current month when called with no parameters, change the current day when called with an integer value * @method int|static dayOfQuarter(?int $day = null) Return the value of the day starting from the beginning of the current quarter when called with no parameters, change the current day when called with an integer value * @method int|static dayOfWeek(?int $day = null) Return the value of the day starting from the beginning of the current week when called with no parameters, change the current day when called with an integer value * @method int daysInCentury() Return the number of days contained in the current century * @method int daysInDecade() Return the number of days contained in the current decade * @method int daysInMillennium() Return the number of days contained in the current millennium * @method int daysInMonth() Return the number of days contained in the current month * @method int daysInQuarter() Return the number of days contained in the current quarter * @method int daysInWeek() Return the number of days contained in the current week * @method int daysInYear() Return the number of days contained in the current year * @method int|static decadeOfCentury(?int $decade = null) Return the value of the decade starting from the beginning of the current century when called with no parameters, change the current decade when called with an integer value * @method int|static decadeOfMillennium(?int $decade = null) Return the value of the decade starting from the beginning of the current millennium when called with no parameters, change the current decade when called with an integer value * @method int decadesInCentury() Return the number of decades contained in the current century * @method int decadesInMillennium() Return the number of decades contained in the current millennium * @method int|static hourOfCentury(?int $hour = null) Return the value of the hour starting from the beginning of the current century when called with no parameters, change the current hour when called with an integer value * @method int|static hourOfDay(?int $hour = null) Return the value of the hour starting from the beginning of the current day when called with no parameters, change the current hour when called with an integer value * @method int|static hourOfDecade(?int $hour = null) Return the value of the hour starting from the beginning of the current decade when called with no parameters, change the current hour when called with an integer value * @method int|static hourOfMillennium(?int $hour = null) Return the value of the hour starting from the beginning of the current millennium when called with no parameters, change the current hour when called with an integer value * @method int|static hourOfMonth(?int $hour = null) Return the value of the hour starting from the beginning of the current month when called with no parameters, change the current hour when called with an integer value * @method int|static hourOfQuarter(?int $hour = null) Return the value of the hour starting from the beginning of the current quarter when called with no parameters, change the current hour when called with an integer value * @method int|static hourOfWeek(?int $hour = null) Return the value of the hour starting from the beginning of the current week when called with no parameters, change the current hour when called with an integer value * @method int|static hourOfYear(?int $hour = null) Return the value of the hour starting from the beginning of the current year when called with no parameters, change the current hour when called with an integer value * @method int hoursInCentury() Return the number of hours contained in the current century * @method int hoursInDay() Return the number of hours contained in the current day * @method int hoursInDecade() Return the number of hours contained in the current decade * @method int hoursInMillennium() Return the number of hours contained in the current millennium * @method int hoursInMonth() Return the number of hours contained in the current month * @method int hoursInQuarter() Return the number of hours contained in the current quarter * @method int hoursInWeek() Return the number of hours contained in the current week * @method int hoursInYear() Return the number of hours contained in the current year * @method int|static microsecondOfCentury(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current century when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfDay(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current day when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfDecade(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current decade when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfHour(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current hour when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfMillennium(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current millennium when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfMillisecond(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current millisecond when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfMinute(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current minute when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfMonth(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current month when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfQuarter(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current quarter when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfSecond(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current second when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfWeek(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current week when called with no parameters, change the current microsecond when called with an integer value * @method int|static microsecondOfYear(?int $microsecond = null) Return the value of the microsecond starting from the beginning of the current year when called with no parameters, change the current microsecond when called with an integer value * @method int microsecondsInCentury() Return the number of microseconds contained in the current century * @method int microsecondsInDay() Return the number of microseconds contained in the current day * @method int microsecondsInDecade() Return the number of microseconds contained in the current decade * @method int microsecondsInHour() Return the number of microseconds contained in the current hour * @method int microsecondsInMillennium() Return the number of microseconds contained in the current millennium * @method int microsecondsInMillisecond() Return the number of microseconds contained in the current millisecond * @method int microsecondsInMinute() Return the number of microseconds contained in the current minute * @method int microsecondsInMonth() Return the number of microseconds contained in the current month * @method int microsecondsInQuarter() Return the number of microseconds contained in the current quarter * @method int microsecondsInSecond() Return the number of microseconds contained in the current second * @method int microsecondsInWeek() Return the number of microseconds contained in the current week * @method int microsecondsInYear() Return the number of microseconds contained in the current year * @method int|static millisecondOfCentury(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current century when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfDay(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current day when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfDecade(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current decade when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfHour(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current hour when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfMillennium(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current millennium when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfMinute(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current minute when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfMonth(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current month when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfQuarter(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current quarter when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfSecond(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current second when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfWeek(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current week when called with no parameters, change the current millisecond when called with an integer value * @method int|static millisecondOfYear(?int $millisecond = null) Return the value of the millisecond starting from the beginning of the current year when called with no parameters, change the current millisecond when called with an integer value * @method int millisecondsInCentury() Return the number of milliseconds contained in the current century * @method int millisecondsInDay() Return the number of milliseconds contained in the current day * @method int millisecondsInDecade() Return the number of milliseconds contained in the current decade * @method int millisecondsInHour() Return the number of milliseconds contained in the current hour * @method int millisecondsInMillennium() Return the number of milliseconds contained in the current millennium * @method int millisecondsInMinute() Return the number of milliseconds contained in the current minute * @method int millisecondsInMonth() Return the number of milliseconds contained in the current month * @method int millisecondsInQuarter() Return the number of milliseconds contained in the current quarter * @method int millisecondsInSecond() Return the number of milliseconds contained in the current second * @method int millisecondsInWeek() Return the number of milliseconds contained in the current week * @method int millisecondsInYear() Return the number of milliseconds contained in the current year * @method int|static minuteOfCentury(?int $minute = null) Return the value of the minute starting from the beginning of the current century when called with no parameters, change the current minute when called with an integer value * @method int|static minuteOfDay(?int $minute = null) Return the value of the minute starting from the beginning of the current day when called with no parameters, change the current minute when called with an integer value * @method int|static minuteOfDecade(?int $minute = null) Return the value of the minute starting from the beginning of the current decade when called with no parameters, change the current minute when called with an integer value * @method int|static minuteOfHour(?int $minute = null) Return the value of the minute starting from the beginning of the current hour when called with no parameters, change the current minute when called with an integer value * @method int|static minuteOfMillennium(?int $minute = null) Return the value of the minute starting from the beginning of the current millennium when called with no parameters, change the current minute when called with an integer value * @method int|static minuteOfMonth(?int $minute = null) Return the value of the minute starting from the beginning of the current month when called with no parameters, change the current minute when called with an integer value * @method int|static minuteOfQuarter(?int $minute = null) Return the value of the minute starting from the beginning of the current quarter when called with no parameters, change the current minute when called with an integer value * @method int|static minuteOfWeek(?int $minute = null) Return the value of the minute starting from the beginning of the current week when called with no parameters, change the current minute when called with an integer value * @method int|static minuteOfYear(?int $minute = null) Return the value of the minute starting from the beginning of the current year when called with no parameters, change the current minute when called with an integer value * @method int minutesInCentury() Return the number of minutes contained in the current century * @method int minutesInDay() Return the number of minutes contained in the current day * @method int minutesInDecade() Return the number of minutes contained in the current decade * @method int minutesInHour() Return the number of minutes contained in the current hour * @method int minutesInMillennium() Return the number of minutes contained in the current millennium * @method int minutesInMonth() Return the number of minutes contained in the current month * @method int minutesInQuarter() Return the number of minutes contained in the current quarter * @method int minutesInWeek() Return the number of minutes contained in the current week * @method int minutesInYear() Return the number of minutes contained in the current year * @method int|static monthOfCentury(?int $month = null) Return the value of the month starting from the beginning of the current century when called with no parameters, change the current month when called with an integer value * @method int|static monthOfDecade(?int $month = null) Return the value of the month starting from the beginning of the current decade when called with no parameters, change the current month when called with an integer value * @method int|static monthOfMillennium(?int $month = null) Return the value of the month starting from the beginning of the current millennium when called with no parameters, change the current month when called with an integer value * @method int|static monthOfQuarter(?int $month = null) Return the value of the month starting from the beginning of the current quarter when called with no parameters, change the current month when called with an integer value * @method int|static monthOfYear(?int $month = null) Return the value of the month starting from the beginning of the current year when called with no parameters, change the current month when called with an integer value * @method int monthsInCentury() Return the number of months contained in the current century * @method int monthsInDecade() Return the number of months contained in the current decade * @method int monthsInMillennium() Return the number of months contained in the current millennium * @method int monthsInQuarter() Return the number of months contained in the current quarter * @method int monthsInYear() Return the number of months contained in the current year * @method int|static quarterOfCentury(?int $quarter = null) Return the value of the quarter starting from the beginning of the current century when called with no parameters, change the current quarter when called with an integer value * @method int|static quarterOfDecade(?int $quarter = null) Return the value of the quarter starting from the beginning of the current decade when called with no parameters, change the current quarter when called with an integer value * @method int|static quarterOfMillennium(?int $quarter = null) Return the value of the quarter starting from the beginning of the current millennium when called with no parameters, change the current quarter when called with an integer value * @method int|static quarterOfYear(?int $quarter = null) Return the value of the quarter starting from the beginning of the current year when called with no parameters, change the current quarter when called with an integer value * @method int quartersInCentury() Return the number of quarters contained in the current century * @method int quartersInDecade() Return the number of quarters contained in the current decade * @method int quartersInMillennium() Return the number of quarters contained in the current millennium * @method int quartersInYear() Return the number of quarters contained in the current year * @method int|static secondOfCentury(?int $second = null) Return the value of the second starting from the beginning of the current century when called with no parameters, change the current second when called with an integer value * @method int|static secondOfDay(?int $second = null) Return the value of the second starting from the beginning of the current day when called with no parameters, change the current second when called with an integer value * @method int|static secondOfDecade(?int $second = null) Return the value of the second starting from the beginning of the current decade when called with no parameters, change the current second when called with an integer value * @method int|static secondOfHour(?int $second = null) Return the value of the second starting from the beginning of the current hour when called with no parameters, change the current second when called with an integer value * @method int|static secondOfMillennium(?int $second = null) Return the value of the second starting from the beginning of the current millennium when called with no parameters, change the current second when called with an integer value * @method int|static secondOfMinute(?int $second = null) Return the value of the second starting from the beginning of the current minute when called with no parameters, change the current second when called with an integer value * @method int|static secondOfMonth(?int $second = null) Return the value of the second starting from the beginning of the current month when called with no parameters, change the current second when called with an integer value * @method int|static secondOfQuarter(?int $second = null) Return the value of the second starting from the beginning of the current quarter when called with no parameters, change the current second when called with an integer value * @method int|static secondOfWeek(?int $second = null) Return the value of the second starting from the beginning of the current week when called with no parameters, change the current second when called with an integer value * @method int|static secondOfYear(?int $second = null) Return the value of the second starting from the beginning of the current year when called with no parameters, change the current second when called with an integer value * @method int secondsInCentury() Return the number of seconds contained in the current century * @method int secondsInDay() Return the number of seconds contained in the current day * @method int secondsInDecade() Return the number of seconds contained in the current decade * @method int secondsInHour() Return the number of seconds contained in the current hour * @method int secondsInMillennium() Return the number of seconds contained in the current millennium * @method int secondsInMinute() Return the number of seconds contained in the current minute * @method int secondsInMonth() Return the number of seconds contained in the current month * @method int secondsInQuarter() Return the number of seconds contained in the current quarter * @method int secondsInWeek() Return the number of seconds contained in the current week * @method int secondsInYear() Return the number of seconds contained in the current year * @method int|static weekOfCentury(?int $week = null) Return the value of the week starting from the beginning of the current century when called with no parameters, change the current week when called with an integer value * @method int|static weekOfDecade(?int $week = null) Return the value of the week starting from the beginning of the current decade when called with no parameters, change the current week when called with an integer value * @method int|static weekOfMillennium(?int $week = null) Return the value of the week starting from the beginning of the current millennium when called with no parameters, change the current week when called with an integer value * @method int|static weekOfMonth(?int $week = null) Return the value of the week starting from the beginning of the current month when called with no parameters, change the current week when called with an integer value * @method int|static weekOfQuarter(?int $week = null) Return the value of the week starting from the beginning of the current quarter when called with no parameters, change the current week when called with an integer value * @method int|static weekOfYear(?int $week = null) Return the value of the week starting from the beginning of the current year when called with no parameters, change the current week when called with an integer value * @method int weeksInCentury() Return the number of weeks contained in the current century * @method int weeksInDecade() Return the number of weeks contained in the current decade * @method int weeksInMillennium() Return the number of weeks contained in the current millennium * @method int weeksInMonth() Return the number of weeks contained in the current month * @method int weeksInQuarter() Return the number of weeks contained in the current quarter * @method int|static yearOfCentury(?int $year = null) Return the value of the year starting from the beginning of the current century when called with no parameters, change the current year when called with an integer value * @method int|static yearOfDecade(?int $year = null) Return the value of the year starting from the beginning of the current decade when called with no parameters, change the current year when called with an integer value * @method int|static yearOfMillennium(?int $year = null) Return the value of the year starting from the beginning of the current millennium when called with no parameters, change the current year when called with an integer value * @method int yearsInCentury() Return the number of years contained in the current century * @method int yearsInDecade() Return the number of years contained in the current decade * @method int yearsInMillennium() Return the number of years contained in the current millennium * * * * @codeCoverageIgnore */ interface CarbonInterface extends DateTimeInterface, JsonSerializable { /** * Diff wording options(expressed in octal). */ public const NO_ZERO_DIFF = 01; public const JUST_NOW = 02; public const ONE_DAY_WORDS = 04; public const TWO_DAY_WORDS = 010; public const SEQUENTIAL_PARTS_ONLY = 020; public const ROUND = 040; public const FLOOR = 0100; public const CEIL = 0200; /** * Diff syntax options. */ public const DIFF_ABSOLUTE = 1; // backward compatibility with true public const DIFF_RELATIVE_AUTO = 0; // backward compatibility with false public const DIFF_RELATIVE_TO_NOW = 2; public const DIFF_RELATIVE_TO_OTHER = 3; /** * Translate string options. */ public const TRANSLATE_MONTHS = 1; public const TRANSLATE_DAYS = 2; public const TRANSLATE_UNITS = 4; public const TRANSLATE_MERIDIEM = 8; public const TRANSLATE_DIFF = 0x10; public const TRANSLATE_ALL = self::TRANSLATE_MONTHS | self::TRANSLATE_DAYS | self::TRANSLATE_UNITS | self::TRANSLATE_MERIDIEM | self::TRANSLATE_DIFF; /** * The day constants. */ public const SUNDAY = 0; public const MONDAY = 1; public const TUESDAY = 2; public const WEDNESDAY = 3; public const THURSDAY = 4; public const FRIDAY = 5; public const SATURDAY = 6; /** * The month constants. * These aren't used by Carbon itself but exist for * convenience sake alone. */ public const JANUARY = 1; public const FEBRUARY = 2; public const MARCH = 3; public const APRIL = 4; public const MAY = 5; public const JUNE = 6; public const JULY = 7; public const AUGUST = 8; public const SEPTEMBER = 9; public const OCTOBER = 10; public const NOVEMBER = 11; public const DECEMBER = 12; /** * Number of X in Y. */ public const YEARS_PER_MILLENNIUM = 1_000; public const YEARS_PER_CENTURY = 100; 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; public const DAYS_PER_WEEK = 7; public const HOURS_PER_DAY = 24; public const MINUTES_PER_HOUR = 60; public const SECONDS_PER_MINUTE = 60; public const MILLISECONDS_PER_SECOND = 1_000; public const MICROSECONDS_PER_MILLISECOND = 1_000; public const MICROSECONDS_PER_SECOND = 1_000_000; /** * Special settings to get the start of week from current locale culture. */ public const WEEK_DAY_AUTO = 'auto'; /** * RFC7231 DateTime format. * * @var string */ public const RFC7231_FORMAT = 'D, d M Y H:i:s \G\M\T'; /** * Default format to use for __toString method when type juggling occurs. * * @var string */ public const DEFAULT_TO_STRING_FORMAT = 'Y-m-d H:i:s'; /** * Format for converting mocked time, includes microseconds. * * @var string */ public const MOCK_DATETIME_FORMAT = 'Y-m-d H:i:s.u'; /** * Pattern detection for ->isoFormat and ::createFromIsoFormat. * * @var string */ public const ISO_FORMAT_REGEXP = '(O[YMDHhms]|[Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY?|g{1,5}|G{1,5}|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?)'; /** * Default locale (language and region). * * @var string */ public const DEFAULT_LOCALE = 'en'; // /** * Dynamically handle calls to the class. * * @param string $method magic method name called * @param array $parameters parameters list * * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable */ public function __call(string $method, array $parameters): mixed; /** * Dynamically handle calls to the class. * * @param string $method magic method name called * @param array $parameters parameters list * * @throws BadMethodCallException */ public static function __callStatic(string $method, array $parameters): mixed; /** * Update constructedObjectId on cloned. */ public function __clone(): void; /** * Create a new Carbon instance. * * Please see the testing aids section (specifically static::setTestNow()) * for more on the possibility of this constructor returning a test instance. * * @throws InvalidFormatException */ public function __construct(DateTimeInterface|WeekDay|Month|string|int|float|null $time = null, DateTimeZone|string|int|null $timezone = null); /** * Show truthy properties on var_dump(). */ public function __debugInfo(): array; /** * Get a part of the Carbon object. * * @throws UnknownGetterException * * @return string|int|bool|DateTimeZone|null */ public function __get(string $name): mixed; /** * Check if an attribute exists on the object * * @param string $name * * @return bool */ public function __isset($name); /** * Set a part of the Carbon object * * @param string $name * @param string|int|DateTimeZone $value * * @throws UnknownSetterException|ReflectionException * * @return void */ public function __set($name, $value); /** * The __set_state handler. * * @param string|array $dump * * @return static */ #[ReturnTypeWillChange] public static function __set_state($dump): static; /** * Returns the list of properties to dump on serialize() called on. * * Only used by PHP < 7.4. * * @return array */ public function __sleep(); /** * Format the instance as a string using the set format * * @example * ``` * echo Carbon::now(); // Carbon instances can be cast to string * ``` */ public function __toString(); /** * Add given units or interval to the current instance. * * @example $date->add('hour', 3) * @example $date->add(15, 'days') * @example $date->add(CarbonInterval::days(4)) * * @param Unit|int|string|DateInterval|Closure|CarbonConverterInterface $unit * @param Unit|int|float|string $value * @param bool|null $overflow * * @return static */ #[ReturnTypeWillChange] public function add($unit, $value = 1, ?bool $overflow = null): static; /** * @deprecated Prefer to use add addUTCUnit() which more accurately defines what it's doing. * * Add seconds to the instance using timestamp. Positive $value travels * forward while negative $value travels into the past. * * @param string $unit * @param int|float|null $value * * @return static */ public function addRealUnit(string $unit, $value = 1): static; /** * Add seconds to the instance using timestamp. Positive $value travels * forward while negative $value travels into the past. * * @param string $unit * @param int|float|null $value * * @return static */ public function addUTCUnit(string $unit, $value = 1): static; /** * Add given units to the current instance. */ public function addUnit(Unit|string $unit, $value = 1, ?bool $overflow = null): static; /** * Add any unit to a new value without overflowing current other unit given. * * @param string $valueUnit unit name to modify * @param int $value amount to add to the input unit * @param string $overflowUnit unit name to not overflow */ public function addUnitNoOverflow(string $valueUnit, int $value, string $overflowUnit): static; /** * Get the difference in a human readable format in the current locale from an other * instance given to now * * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single part) * @param int $options human diff options * * @return string */ public function ago($syntax = null, $short = false, $parts = 1, $options = null); /** * Modify the current instance to the average of a given instance (default now) and the current instance * (second-precision). * * @param \Carbon\Carbon|\DateTimeInterface|null $date * * @return static */ public function average($date = null); /** * Clone the current instance if it's mutable. * * This method is convenient to ensure you don't mutate the initial object * but avoid to make a useless copy of it if it's already immutable. * * @return static */ public function avoidMutation(): static; /** * Determines if the instance is between two others. * * The third argument allow you to specify if bounds are included or not (true by default) * but for when you including/excluding bounds may produce different results in your application, * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. * * @example * ``` * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false * ``` * * @param bool $equal Indicates if an equal to comparison should be done */ public function between(DateTimeInterface|string $date1, DateTimeInterface|string $date2, bool $equal = true): bool; /** * Determines if the instance is between two others, bounds excluded. * * @example * ``` * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false * ``` */ public function betweenExcluded(DateTimeInterface|string $date1, DateTimeInterface|string $date2): bool; /** * Determines if the instance is between two others, bounds included. * * @example * ``` * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true * ``` */ public function betweenIncluded(DateTimeInterface|string $date1, DateTimeInterface|string $date2): bool; /** * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, * or a calendar date (e.g. "10/29/2017") otherwise. * * Language, date and time formats will change according to the current locale. * * @param Carbon|\DateTimeInterface|string|null $referenceTime * @param array $formats * * @return string */ public function calendar($referenceTime = null, array $formats = []); /** * Checks if the (date)time string is in a given format and valid to create a * new instance. * * @example * ``` * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false * ``` */ public static function canBeCreatedFromFormat(?string $date, string $format): bool; /** * Return the Carbon instance passed through, a now instance in the same timezone * if null given or parse the input if string given. * * @param Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date * * @return static */ public function carbonize($date = null); /** * Cast the current instance into the given class. * * @template T * * @param class-string $className The $className::instance() method will be called to cast the current object. * * @return T */ public function cast(string $className): mixed; /** * Ceil the current instance second with given precision if specified. */ public function ceil(DateInterval|string|int|float $precision = 1): static; /** * Ceil the current instance at the given unit with given precision if specified. */ public function ceilUnit(string $unit, DateInterval|string|int|float $precision = 1): static; /** * Ceil the current instance week. * * @param WeekDay|int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week */ public function ceilWeek(WeekDay|int|null $weekStartsAt = null): static; /** * Similar to native modify() method of DateTime but can handle more grammars. * * @example * ``` * echo Carbon::now()->change('next 2pm'); * ``` * * @link https://php.net/manual/en/datetime.modify.php * * @param string $modifier * * @return static */ public function change($modifier); /** * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. * foreach ($date as $_) {} * serializer($date) * var_export($date) * get_object_vars($date) */ public function cleanupDumpProperties(); /** * @alias copy * * Get a copy of the instance. * * @return static */ public function clone(); /** * Get the closest date from the instance (second-precision). * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ public function closest($date1, $date2); /** * Get a copy of the instance. * * @return static */ public function copy(); /** * Create a new Carbon instance from a specific date and time. * * If any of $year, $month or $day are set to null their now() values will * be used. * * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * * If $hour is not null then the default values for $minute and $second * will be 0. * * @param DateTimeInterface|string|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|int|null $timezone * * @throws InvalidFormatException * * @return static|null */ public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $timezone = null); /** * Create a Carbon instance from just a date. The time portion is set to now. * * @param int|null $year * @param int|null $month * @param int|null $day * @param DateTimeZone|string|int|null $timezone * * @throws InvalidFormatException * * @return static */ public static function createFromDate($year = null, $month = null, $day = null, $timezone = null); /** * Create a Carbon instance from a specific format. * * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|int|null $timezone * * @throws InvalidFormatException * * @return static|null */ #[ReturnTypeWillChange] public static function createFromFormat($format, $time, $timezone = null); /** * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). * * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|int|null $timezone optional timezone * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) * @param TranslatorInterface|null $translator optional custom translator to use for macro-formats * * @throws InvalidFormatException * * @return static|null */ public static function createFromIsoFormat(string $format, string $time, $timezone = null, ?string $locale = 'en', ?TranslatorInterface $translator = null); /** * Create a Carbon instance from a specific format and a string in a given language. * * @param string $format Datetime format * @param string $locale * @param string $time * @param DateTimeZone|string|int|null $timezone * * @throws InvalidFormatException * * @return static|null */ public static function createFromLocaleFormat(string $format, string $locale, string $time, $timezone = null); /** * Create a Carbon instance from a specific ISO format and a string in a given language. * * @param string $format Datetime ISO format * @param string $locale * @param string $time * @param DateTimeZone|string|int|null $timezone * * @throws InvalidFormatException * * @return static|null */ public static function createFromLocaleIsoFormat(string $format, string $locale, string $time, $timezone = null); /** * Create a Carbon instance from just a time. The date portion is set to today. * * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|int|null $timezone * * @throws InvalidFormatException * * @return static */ public static function createFromTime($hour = 0, $minute = 0, $second = 0, $timezone = null): static; /** * Create a Carbon instance from a time string. The date portion is set to today. * * @throws InvalidFormatException */ public static function createFromTimeString(string $time, DateTimeZone|string|int|null $timezone = null): static; /** * Create a Carbon instance from a timestamp and set the timezone (UTC by default). * * Timestamp input can be given as int, float or a string containing one or more numbers. */ public static function createFromTimestamp(string|int|float $timestamp, DateTimeZone|string|int|null $timezone = null): static; /** * Create a Carbon instance from a timestamp in milliseconds. * * Timestamp input can be given as int, float or a string containing one or more numbers. */ public static function createFromTimestampMs(string|int|float $timestamp, DateTimeZone|string|int|null $timezone = null): static; /** * Create a Carbon instance from a timestamp in milliseconds. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * * @return static */ public static function createFromTimestampMsUTC($timestamp): static; /** * Create a Carbon instance from a timestamp keeping the timezone to UTC. * * Timestamp input can be given as int, float or a string containing one or more numbers. */ public static function createFromTimestampUTC(string|int|float $timestamp): static; /** * Create a Carbon instance from just a date. The time portion is set to midnight. * * @param int|null $year * @param int|null $month * @param int|null $day * @param DateTimeZone|string|int|null $timezone * * @throws InvalidFormatException * * @return static */ public static function createMidnightDate($year = null, $month = null, $day = null, $timezone = null); /** * Create a new safe Carbon instance from a specific date and time. * * If any of $year, $month or $day are set to null their now() values will * be used. * * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * * If $hour is not null then the default values for $minute and $second * will be 0. * * If one of the set values is not valid, an InvalidDateException * will be thrown. * * @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|int|null $timezone * * @throws InvalidDateException * * @return static|null */ public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $timezone = null); /** * Create a new Carbon instance from a specific date and time using strict validation. * * @see create() * * @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|int|null $timezone * * @throws InvalidFormatException * * @return static */ public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $timezone = null): static; /** * Get/set the day of year. * * @template T of int|null * * @param int|null $value new value for day of year if using as setter. * * @psalm-param T $value * * @return static|int * * @psalm-return (T is int ? static : int) */ public function dayOfYear(?int $value = null): static|int; /** * Get the difference as a CarbonInterval instance. * Return relative interval (negative if $absolute flag is not set to true and the given date is before * current one). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return CarbonInterval */ public function diffAsCarbonInterval($date = null, bool $absolute = false, array $skip = []): CarbonInterval; /** * Get the difference as a DateInterval instance. * Return relative interval (negative if $absolute flag is not set to true and the given date is before * current one). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return DateInterval */ public function diffAsDateInterval($date = null, bool $absolute = false): DateInterval; /** * Get the difference by the given interval using a filter closure. * * @param CarbonInterval $ci An interval to traverse by * @param Closure $callback * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, bool $absolute = false): int; /** * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). * * @example * ``` * echo Carbon::tomorrow()->diffForHumans() . "\n"; * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; * ``` * * @param Carbon|DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * ⦿ 'syntax' entry (see below) *