diff --git a/docs/index.html b/docs/index.html
index 59574bf941..9f65515e1d 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -5786,7 +5786,7 @@
Getters
// Returns timezone as CarbonTimeZone
var_dump(Carbon::createFromTimestamp(0, 'Europe/Paris')->getTimezone());
-/* object(Carbon\CarbonTimeZone)#2700 (3) {
+/* object(Carbon\CarbonTimeZone)#533 (3) {
["clock":"Carbon\CarbonTimeZone":private]=>
NULL
["timezone_type"]=>
@@ -6176,7 +6176,7 @@ Conversion
["formatted"]=>
string(19) "2019-02-01 03:45:27"
["timezone"]=>
- object(Carbon\CarbonTimeZone)#1092 (3) {
+ object(Carbon\CarbonTimeZone)#1096 (3) {
["clock":"Carbon\CarbonTimeZone":private]=>
NULL
["timezone_type"]=>
@@ -6189,7 +6189,7 @@ Conversion
var_dump($dt->toObject());
/*
-object(stdClass)#1092 (12) {
+object(stdClass)#1096 (12) {
["year"]=>
int(2019)
["month"]=>
@@ -6213,7 +6213,7 @@ Conversion
["formatted"]=>
string(19) "2019-02-01 03:45:27"
["timezone"]=>
- object(Carbon\CarbonTimeZone)#1377 (3) {
+ object(Carbon\CarbonTimeZone)#1093 (3) {
["clock":"Carbon\CarbonTimeZone":private]=>
NULL
["timezone_type"]=>
@@ -6226,7 +6226,7 @@ Conversion
var_dump($dt->toDate()); // Same as $dt->toDateTime()
/*
-object(DateTime)#1092 (3) {
+object(DateTime)#1096 (3) {
["date"]=>
string(26) "2019-02-01 03:45:27.612584"
["timezone_type"]=>
@@ -6240,7 +6240,7 @@ Conversion
// to both DateTime and DateTimeImmutable
var_dump($dt->toDateTimeImmutable());
/*
-object(DateTimeImmutable)#1092 (3) {
+object(DateTimeImmutable)#1096 (3) {
["date"]=>
string(26) "2019-02-01 03:45:27.612584"
["timezone_type"]=>
@@ -7574,9 +7574,9 @@ Serialization
$dt = Carbon::create(2012, 12, 25, 20, 30, 00, 'Europe/Moscow');
-echo serialize($dt); // O:13:"Carbon\Carbon":3:{s:4:"date";s:26:"2012-12-25 20:30:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/Moscow";}
+echo serialize($dt); // O:13:"Carbon\Carbon":4:{s:4:"date";s:26:"2012-12-25 20:30:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/Moscow";s:18:"dumpDateProperties";a:2:{s:4:"date";s:26:"2012-12-25 20:30:00.000000";s:8:"timezone";s:13:"Europe/Moscow";}}
// same as:
-echo $dt->serialize(); // O:13:"Carbon\Carbon":3:{s:4:"date";s:26:"2012-12-25 20:30:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/Moscow";}
+echo $dt->serialize(); // O:13:"Carbon\Carbon":4:{s:4:"date";s:26:"2012-12-25 20:30:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/Moscow";s:18:"dumpDateProperties";a:2:{s:4:"date";s:26:"2012-12-25 20:30:00.000000";s:8:"timezone";s:13:"Europe/Moscow";}}
$dt = 'O:13:"Carbon\Carbon":3:{s:4:"date";s:26:"2012-12-25 20:30:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/Moscow";}';
diff --git a/reference/index.html b/reference/index.html
index 042190c072..1d3b3e29de 100644
--- a/reference/index.html
+++ b/reference/index.html
@@ -24,7 +24,7 @@ Carbon::__serialize
returns array
Returns the values to dump on serialize() called on.
Only used by PHP >= 7.4.
- Method added | 1.37.1 | no arguments |
+ Method added | 1.21.0 | no arguments |
@@ -33,7 +33,7 @@ Carbon::__unserialize
array $data
Set locale if specified on unserialize() called.
Only used by PHP >= 7.4.
- Method added | 1.37.1 | array $data |
+ Method added | 1.21.0 | array $data |
@@ -94,7 +94,7 @@ Carbon::format
string $format
returns string
Returns the formatted date string on success or FALSE on failure.
- Prototype changed | 3.0.0 | string $format |
Prototype changed | 2.16.0 | $format |
Prototype changed | 1.37.1 | string $format |
+ Prototype changed | 3.0.0 | string $format |
Prototype changed | 2.16.0 | $format |
Prototype changed | 1.21.0 | string $format |
Method added | 1.0.0 | $format |
@@ -104,7 +104,7 @@ Carbon::modify
$modify
returns Carbon
Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else.
- Prototype changed | 2.23.0 | $modify |
Prototype changed | 1.37.1 | string $modifier |
+ Prototype changed | 2.23.0 | $modify |
Prototype changed | 1.23.0 | string $modifier |
Prototype changed | 1.22.0 | $modify |
Prototype changed | 1.21.0 | string $modifier |
Method added | 1.0.0 | $modify |
@@ -114,7 +114,7 @@ Carbon::add
$unit, $value = 1, ?bool $overflow = null
returns Carbon
Add given units or interval to the current instance.
Examples:
$date->add('hour', 3)
$date->add(15, 'days')
$date->add(CarbonInterval::days(4))
- Prototype changed | 3.0.0 | $unit, $value = 1, ?bool $overflow = null |
Prototype changed | 2.0.0 | $unit, $value = 1, $overflow = null |
Prototype changed | 1.37.1 | DateInterval $interval |
+ Prototype changed | 3.0.0 | $unit, $value = 1, ?bool $overflow = null |
Prototype changed | 2.0.0 | $unit, $value = 1, $overflow = null |
Prototype changed | 1.21.0 | DateInterval $interval |
Method added | 1.0.0 | $interval |
@@ -124,7 +124,7 @@ Carbon::sub
$unit, $value = 1, ?bool $overflow = null
returns Carbon
Subtract given units or interval to the current instance.
Examples:
$date->sub('hour', 3)
$date->sub(15, 'days')
$date->sub(CarbonInterval::days(4))
- Prototype changed | 3.0.0 | $unit, $value = 1, ?bool $overflow = null |
Prototype changed | 2.0.0 | $unit, $value = 1, $overflow = null |
Prototype changed | 1.37.1 | DateInterval $interval |
+ Prototype changed | 3.0.0 | $unit, $value = 1, ?bool $overflow = null |
Prototype changed | 2.0.0 | $unit, $value = 1, $overflow = null |
Prototype changed | 1.21.0 | DateInterval $interval |
Method added | 1.0.0 | $interval |
@@ -160,7 +160,7 @@ Carbon::setTime
int $hour, int $minute, int $second = 0, int $microseconds = 0
returns Carbon
Resets the current time of the DateTime object to a different time.
- Prototype changed | 3.0.0 | int $hour, int $minute, int $second = 0, int $microseconds = 0 |
Prototype changed | 2.23.0 | $hour, $minute, $second = 0, $microseconds = 0 |
Prototype changed | 1.37.1 | int $hour, int $minute, int $second = 0, int $microsecond = 0 |
Prototype changed | 1.15.0 | $hour, $minute, $second, $microseconds |
+ Prototype changed | 3.0.0 | int $hour, int $minute, int $second = 0, int $microseconds = 0 |
Prototype changed | 2.23.0 | $hour, $minute, $second = 0, $microseconds = 0 |
Prototype changed | 1.21.0 | int $hour, int $minute, int $second = 0, int $microsecond = 0 |
Prototype changed | 1.15.0 | $hour, $minute, $second, $microseconds |
Method added | 1.0.0 | $hour, $minute, $second = 0 |
@@ -170,7 +170,7 @@ Carbon::setDate
int $year, int $month, int $day
returns Carbon
Set the date with gregorian year, month and day numbers.
- Prototype changed | 3.0.0 | int $year, int $month, int $day |
Prototype changed | 2.23.0 | $year, $month, $day |
Prototype changed | 2.0.0 | int $year, int $month, int $day |
+ Prototype changed | 3.0.0 | int $year, int $month, int $day |
Prototype changed | 2.23.0 | $year, $month, $day |
Prototype changed | 2.0.0 | int $year, int $month, int $day |
Prototype changed | 1.22.0 | $year, $month, $day |
Prototype changed | 1.21.0 | int $year, int $month, int $day |
Method added | 1.0.0 | $year, $month, $day |
@@ -180,7 +180,7 @@ Carbon::setISODate
int $year, int $week, int $day = 1
returns Carbon
Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
- Prototype changed | 3.0.0 | int $year, int $week, int $day = 1 |
Prototype changed | 2.23.0 | $year, $week, $day = 1 |
Prototype changed | 1.37.1 | int $year, int $week, int $dayOfWeek = 1 |
+ Prototype changed | 3.0.0 | int $year, int $week, int $day = 1 |
Prototype changed | 2.23.0 | $year, $week, $day = 1 |
Prototype changed | 1.21.0 | int $year, int $week, int $dayOfWeek = 1 |
Method added | 1.0.0 | $year, $week, $day |
@@ -190,7 +190,7 @@ Carbon::setTimestamp
string|int|float $timestamp
returns Carbon
Set the instance's timestamp.
Timestamp input can be given as int, float or a string containing one or more numbers.
- Prototype changed | 3.0.0 | string|int|float $timestamp |
Prototype changed | 2.41.0 | $unixTimestamp |
Prototype changed | 2.23.0 | $unixtimestamp |
Prototype changed | 1.37.1 | int $timestamp |
+ Prototype changed | 3.0.0 | string|int|float $timestamp |
Prototype changed | 2.41.0 | $unixTimestamp |
Prototype changed | 2.23.0 | $unixtimestamp |
Prototype changed | 1.21.0 | int $timestamp |
Method added | 1.0.0 | $unixtimestamp |
@@ -208,7 +208,7 @@ Carbon::diff
@alias diffAsCarbonInterval
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).
- Prototype changed | 3.0.0 | $date = null, bool $absolute = false, array $skip = [] |
Prototype changed | 2.23.0 | $date = null, $absolute = false |
Prototype changed | 1.37.1 | DateTimeInterface $targetObject, bool $absolute = false |
+ Prototype changed | 3.0.0 | $date = null, bool $absolute = false, array $skip = [] |
Prototype changed | 2.23.0 | $date = null, $absolute = false |
Prototype changed | 1.21.0 | DateTimeInterface $targetObject, bool $absolute = false |
Method added | 1.0.0 | $object, $absolute |
@@ -1391,7 +1391,7 @@ Carbon::isSameAs
Compares the formatted values of the two dates.
Examples:
Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true
Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false
Prototype changed | 3.0.0 | string $format, DateTimeInterface|string $date |
Prototype changed | 1.23.0 | $format, $date = null |
- Method added | 1.22.0 | $format, Carbon\Carbon $date = null |
+ Method added | 1.22.0 | $format, ?Carbon\Carbon $date = null |
@@ -1439,7 +1439,7 @@ Carbon::isSameMonth
Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false
Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true
Prototype changed | 3.0.0 | DateTimeInterface|string $date, bool $ofSameYear = true |
Prototype changed | 2.0.0 | $date = null, $ofSameYear = true |
Prototype changed | 1.29.2 | $date = null, $ofSameYear = null |
Prototype changed | 1.23.0 | $date = null, $ofSameYear = false |
- Method added | 1.22.0 | Carbon\Carbon $date = null, $ofSameYear = false |
+ Method added | 1.22.0 | ?Carbon\Carbon $date = null, $ofSameYear = false |
@@ -1464,7 +1464,7 @@ Carbon::isBirthday
Carbon::now()->subYears(5)->subDay()->isBirthday(); // false
Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true
Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false
- Prototype changed | 3.0.0 | DateTimeInterface|string|null $date = null |
Prototype changed | 1.23.0 | $date = null |
Prototype changed | 1.21.0 | Carbon\Carbon $date = null |
+ Prototype changed | 3.0.0 | DateTimeInterface|string|null $date = null |
Prototype changed | 1.23.0 | $date = null |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null |
Method added | 1.14.0 | Carbon\Carbon $date |
@@ -2485,7 +2485,7 @@ Carbon::diffInYears
$date = null, bool $absolute = false, bool $utc = false
returns float
Get the difference in years
- Prototype changed | 3.2.0 | $date = null, bool $absolute = false, bool $utc = false |
Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.2.0 | $date = null, bool $absolute = false, bool $utc = false |
Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.0.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2505,7 +2505,7 @@ Carbon::diffInMonths
$date = null, bool $absolute = false, bool $utc = false
returns float
Get the difference in months.
- Prototype changed | 3.2.0 | $date = null, bool $absolute = false, bool $utc = false |
Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.2.0 | $date = null, bool $absolute = false, bool $utc = false |
Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.0.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2515,7 +2515,7 @@ Carbon::diffInWeeks
$date = null, bool $absolute = false, bool $utc = false
returns float
Get the difference in weeks.
- Prototype changed | 3.2.0 | $date = null, bool $absolute = false, bool $utc = false |
Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.2.0 | $date = null, bool $absolute = false, bool $utc = false |
Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.11.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2525,7 +2525,7 @@ Carbon::diffInDays
$date = null, bool $absolute = false, bool $utc = false
returns float
Get the difference in days.
- Prototype changed | 3.2.0 | $date = null, bool $absolute = false, bool $utc = false |
Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.2.0 | $date = null, bool $absolute = false, bool $utc = false |
Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.0.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2535,7 +2535,7 @@ Carbon::diffInDaysFiltered
Closure $callback, $date = null, bool $absolute = false
returns int
Get the difference in days using a filter closure.
- Prototype changed | 3.0.0 | Closure $callback, $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | Closure $callback, $date = null, $absolute = true |
Prototype changed | 1.23.0 | Closure $callback, self $date = null, $absolute = true |
+ Prototype changed | 3.0.0 | Closure $callback, $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | Closure $callback, $date = null, $absolute = true |
Prototype changed | 1.23.0 | Closure $callback, ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | Closure $callback, ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.12.0 | Closure $callback, Carbon\Carbon $date = null, $absolute = true |
@@ -2545,7 +2545,7 @@ Carbon::diffInHoursFiltered
Closure $callback, $date = null, bool $absolute = false
returns int
Get the difference in hours using a filter closure.
- Prototype changed | 3.0.0 | Closure $callback, $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | Closure $callback, $date = null, $absolute = true |
Prototype changed | 1.23.0 | Closure $callback, self $date = null, $absolute = true |
+ Prototype changed | 3.0.0 | Closure $callback, $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | Closure $callback, $date = null, $absolute = true |
Prototype changed | 1.23.0 | Closure $callback, ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | Closure $callback, ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.18.0 | Closure $callback, Carbon\Carbon $date = null, $absolute = true |
@@ -2555,7 +2555,7 @@ Carbon::diffFiltered
Carbon\CarbonInterval $ci, Closure $callback, $date = null, bool $absolute = false
returns int
Get the difference by the given interval using a filter closure.
- Prototype changed | 3.0.0 | Carbon\CarbonInterval $ci, Closure $callback, $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | Carbon\CarbonInterval $ci, Closure $callback, $date = null, $absolute = true |
Prototype changed | 1.23.0 | Carbon\CarbonInterval $ci, Closure $callback, self $date = null, $absolute = true |
+ Prototype changed | 3.0.0 | Carbon\CarbonInterval $ci, Closure $callback, $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | Carbon\CarbonInterval $ci, Closure $callback, $date = null, $absolute = true |
Prototype changed | 1.23.0 | Carbon\CarbonInterval $ci, Closure $callback, ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | Carbon\CarbonInterval $ci, Closure $callback, ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.18.0 | Carbon\CarbonInterval $ci, Closure $callback, Carbon\Carbon $date = null, $absolute = true |
@@ -2565,7 +2565,7 @@ Carbon::diffInWeekdays
$date = null, bool $absolute = false
returns int
Get the difference in weekdays.
- Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.12.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2575,7 +2575,7 @@ Carbon::diffInWeekendDays
$date = null, bool $absolute = false
returns int
Get the difference in weekend days using a filter.
- Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.12.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2585,7 +2585,7 @@ Carbon::diffInHours
$date = null, bool $absolute = false
returns float
Get the difference in hours.
- Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.0.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2595,7 +2595,7 @@ Carbon::diffInMinutes
$date = null, bool $absolute = false
returns float
Get the difference in minutes.
- Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.0.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2605,7 +2605,7 @@ Carbon::diffInSeconds
$date = null, bool $absolute = false
returns float
Get the difference in seconds.
- Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | self $date = null, $absolute = true |
+ Prototype changed | 3.0.0 | $date = null, bool $absolute = false |
Prototype changed | 1.24.0 | $date = null, $absolute = true |
Prototype changed | 1.23.0 | ?self $date = null, $absolute = true |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null, $absolute = true |
Method added | 1.0.0 | Carbon\Carbon $date = null, $absolute = true |
@@ -2660,7 +2660,7 @@ Carbon::diffForHumans
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";
- Prototype changed | 2.0.0 | $other = null, $syntax = null, $short = false, $parts = 1, $options = null |
Prototype changed | 1.25.0 | $other = null, $absolute = false, $short = false, $parts = 1 |
Prototype changed | 1.23.0 | self $other = null, $absolute = false, $short = false, $parts = 1 |
Prototype changed | 1.22.0 | Carbon\Carbon $other = null, $absolute = false, $short = false |
Prototype changed | 1.14.0 | Carbon\Carbon $other = null, $absolute = false |
+ Prototype changed | 2.0.0 | $other = null, $syntax = null, $short = false, $parts = 1, $options = null |
Prototype changed | 1.25.0 | $other = null, $absolute = false, $short = false, $parts = 1 |
Prototype changed | 1.23.0 | ?self $other = null, $absolute = false, $short = false, $parts = 1 |
Prototype changed | 1.22.0 | ?Carbon\Carbon $other = null, $absolute = false, $short = false |
Prototype changed | 1.21.0 | ?Carbon\Carbon $other = null, $absolute = false |
Prototype changed | 1.14.0 | Carbon\Carbon $other = null, $absolute = false |
Method added | 1.0.0 | Carbon\Carbon $other = null |
@@ -3093,7 +3093,7 @@ Carbon::average
returns Carbon
Modify the current instance to the average of a given instance (default now) and the current instance
(second-precision).
- Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | self $date = null |
+ Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | ?self $date = null |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null |
Method added | 1.7.0 | Carbon\Carbon $date = null |
@@ -3123,7 +3123,7 @@ Carbon::min
$date = null
returns Carbon
Get the minimum instance between a given instance (default now) and the current instance.
- Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | self $date = null |
+ Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | ?self $date = null |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null |
Method added | 1.8.0 | Carbon\Carbon $date = null |
@@ -3133,8 +3133,8 @@ Carbon::minimum
$date = null
returns Carbon
Get the minimum instance between a given instance (default now) and the current instance.
- Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | self $date = null |
- Method added | 1.22.0 | Carbon\Carbon $date = null |
+ Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | ?self $date = null |
+ Method added | 1.22.0 | ?Carbon\Carbon $date = null |
@@ -3143,7 +3143,7 @@ Carbon::max
$date = null
returns Carbon
Get the maximum instance between a given instance (default now) and the current instance.
- Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | self $date = null |
+ Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | ?self $date = null |
Prototype changed | 1.21.0 | ?Carbon\Carbon $date = null |
Method added | 1.8.0 | Carbon\Carbon $date = null |
@@ -3153,8 +3153,8 @@ Carbon::maximum
$date = null
returns Carbon
Get the maximum instance between a given instance (default now) and the current instance.
- Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | self $date = null |
- Method added | 1.22.0 | Carbon\Carbon $date = null |
+ Prototype changed | 1.24.0 | $date = null |
Prototype changed | 1.23.0 | ?self $date = null |
+ Method added | 1.22.0 | ?Carbon\Carbon $date = null |
@@ -3791,7 +3791,7 @@ Carbon::setTestNow
has no affect as the mock value will be returned regardless of its value.
Only the moment is mocked with setTestNow(), the timezone will still be the one passed
as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()).
To clear the test instance call this method using the default
parameter of null.
/!\ Use this method for unit tests only.
- Prototype changed | 3.0.0 | mixed $testNow = null |
Prototype changed | 1.22.0 | $testNow = null |
+ Prototype changed | 3.0.0 | mixed $testNow = null |
Prototype changed | 1.22.0 | $testNow = null |
Prototype changed | 1.21.0 | ?Carbon\Carbon $testNow = null |
Method added | 1.3.0 | Carbon\Carbon $testNow = null |
@@ -5757,7 +5757,7 @@ CarbonInterval::createFromDateString
string $datetime
returns CarbonInterval
Sets up a DateInterval from the relative parts of the string.
- Prototype changed | 3.0.0 | string $datetime |
Prototype changed | 2.0.0 | $time |
Prototype changed | 1.37.1 | string $datetime |
+ Prototype changed | 3.0.0 | string $datetime |
Prototype changed | 2.0.0 | $time |
Prototype changed | 1.21.0 | string $datetime |
Method added | 1.18.0 | $time |
@@ -5918,7 +5918,7 @@ CarbonInterval::format
string $format
returns string
Returns the formatted date string on success or FALSE on failure.
- Prototype changed | 1.37.1 | string $format |
+ Prototype changed | 1.21.0 | string $format |
Method added | 1.18.0 | $format |
@@ -6384,7 +6384,7 @@ CarbonInterval::__unserialize
array $data
Set locale if specified on unserialize() called.
Only used by PHP >= 7.4.
- Method added | 1.37.1 | array $data |
+ Method added | 1.21.0 | array $data |
@@ -8712,8 +8712,8 @@ Translator::__construct
$locale, ?Symfony\Component\Translation\Formatter\MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false
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.
- Prototype changed | 1.37.1 | $locale, ?Symfony\Component\Translation\Formatter\MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false |
- Method added | 1.25.0 | $locale, Symfony\Component\Translation\Formatter\MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false |
+
+ Method added | 1.25.0 | $locale, ?Symfony\Component\Translation\Formatter\MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false |
@@ -9249,7 +9249,7 @@ Carbon::isSameYear
returns bool
Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone).
Prototype changed | 3.2.0 | DateTimeInterface|string $date |
Prototype changed | 2.34.2 | Carbon|DateTimeInterface|string|null $date = null |
Prototype changed | 2.24.0 | \Carbon\Carbon|\DateTimeInterface|string|null $date = null |
Prototype changed | 2.0.0 | \DateTimeInterface $date = null |
Prototype changed | 1.23.0 | $date = null |
- Method added | 1.22.0 | Carbon\Carbon $date = null |
+ Method added | 1.22.0 | ?Carbon\Carbon $date = null |
diff --git a/tools/api-history.php b/tools/api-history.php
index 05ef292ca5..9a3552cb09 100644
--- a/tools/api-history.php
+++ b/tools/api-history.php
@@ -258,7 +258,7 @@ function getMethodsOfVersion($version, bool $forceRebuild = false)
$branch = $version === MASTER_VERSION ? MASTER_BRANCH : $version;
$baseDir = dirname(__DIR__);
- $sandboxDir = $baseDir . DIRECTORY_SEPARATOR . 'sandbox';
+ $sandboxDir = $baseDir.DIRECTORY_SEPARATOR.'sandbox';
removeDirectory($sandboxDir);
mkdir($sandboxDir);
chdir($sandboxDir);
diff --git a/tools/generate.php b/tools/generate.php
index 5c705c13ea..3867de9fe3 100644
--- a/tools/generate.php
+++ b/tools/generate.php
@@ -277,7 +277,7 @@ function getAllBackers(): array
'isActive' => true,
'totalAmountDonated' => 1000,
'currency' => 'USD',
- 'lastTransactionAt' => CarbonImmutable::now()->format('Y-m-d') . ' 02:00',
+ 'lastTransactionAt' => CarbonImmutable::now()->format('Y-m-d').' 02:00',
'lastTransactionAmount' => 25,
'profile' => 'https://tidelift.com/',
'name' => 'Tidelift',
@@ -379,7 +379,7 @@ function getOpenCollective(string $status): string
$width = $validImage ? round($x * $height / $y) : $height;
if (!str_contains($href, 'utm_source') && !preg_match('/^https?:\/\/(?:onlinekasyno-polis\.pl|zonaminecraft\.net)(\/.*)?$/', $href)) {
- $href .= (!str_contains($href, '?') ? '?' : '&') . 'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon';
+ $href .= (!str_contains($href, '?') ? '?' : '&').'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon';
}
$title = htmlspecialchars(($member['description'] ?? null) ?: $member['name']);