diff --git a/docs/index.html b/docs/index.html index f97a9aa61f..bd0f2783be 100644 --- a/docs/index.html +++ b/docs/index.html @@ -133,13 +133,13 @@

Introduction

$modifiedImmutable = CarbonImmutable::now()->add(1, 'day'); var_dump($modifiedMutable === $mutable); // bool(true) -var_dump($mutable->isoFormat('dddd D')); // string(10) "Tuesday 20" -var_dump($modifiedMutable->isoFormat('dddd D')); // string(10) "Tuesday 20" +var_dump($mutable->isoFormat('dddd D')); // string(9) "Monday 16" +var_dump($modifiedMutable->isoFormat('dddd D')); // string(9) "Monday 16" // So it means $mutable and $modifiedMutable are the same object // both set to now + 1 day. var_dump($modifiedImmutable === $immutable); // bool(false) -var_dump($immutable->isoFormat('dddd D')); // string(9) "Monday 19" -var_dump($modifiedImmutable->isoFormat('dddd D')); // string(10) "Tuesday 20" +var_dump($immutable->isoFormat('dddd D')); // string(9) "Sunday 15" +var_dump($modifiedImmutable->isoFormat('dddd D')); // string(9) "Monday 16" // While $immutable is still set to now and cannot be changed and // $modifiedImmutable is a new instance created from $immutable // set to now + 1 day. @@ -281,16 +281,16 @@

Instantiation

$now = Carbon::now();
-echo $now;                               // 2024-08-19 07:35:05
+echo $now;                               // 2024-09-15 20:26:50
 echo "\n";
 $today = Carbon::today();
-echo $today;                             // 2024-08-19 00:00:00
+echo $today;                             // 2024-09-15 00:00:00
 echo "\n";
 $tomorrow = Carbon::tomorrow('Europe/London');
-echo $tomorrow;                          // 2024-08-20 00:00:00
+echo $tomorrow;                          // 2024-09-16 00:00:00
 echo "\n";
 $yesterday = Carbon::yesterday();
-echo $yesterday;                         // 2024-08-18 00:00:00
+echo $yesterday;                         // 2024-09-14 00:00:00
 

@@ -451,7 +451,7 @@

Instantiation

// 19:15 in Johannesburg echo 'Meeting starts at '.$meeting->format('H:i').' in Johannesburg.'; // Meeting starts at 19:15 in Johannesburg. // now in Johannesburg -echo "It's ".$meeting->nowWithSameTz()->format('H:i').' right now in Johannesburg.'; // It's 09:35 right now in Johannesburg. +echo "It's ".$meeting->nowWithSameTz()->format('H:i').' right now in Johannesburg.'; // It's 22:26 right now in Johannesburg.

@@ -703,9 +703,9 @@

Localization

echo "\n"; echo $date->diffForHumans(); // il y a 0 seconde echo "\n"; -echo $date->monthName; // août +echo $date->monthName; // septembre echo "\n"; -echo $date->isoFormat('LLLL'); // lundi 19 août 2024 07:35 +echo $date->isoFormat('LLLL'); // dimanche 15 septembre 2024 20:26

@@ -736,13 +736,13 @@

Localization

echo $toDisplay; /* 15 juin 2018 14:34 -Aujourd’hui à 09:35 +Aujourd’hui à 22:26 */ echo $notificationForJohn; /* Jun 15, 2018 7:34 AM -Today at 2:35 AM +Today at 3:26 PM */

@@ -769,9 +769,9 @@

Localization

]); // Important note: timezone setting calls ->shiftTimezone() and not ->setTimezone(), // It means it does not just set the timezone, but shift the time too: -echo Carbon::today()->setTimezone('Asia/Tokyo')->format('d/m G\h e'); // 19/08 9h Asia/Tokyo +echo Carbon::today()->setTimezone('Asia/Tokyo')->format('d/m G\h e'); // 15/09 9h Asia/Tokyo echo "\n"; -echo Carbon::today()->shiftTimezone('Asia/Tokyo')->format('d/m G\h e'); // 19/08 0h Asia/Tokyo +echo Carbon::today()->shiftTimezone('Asia/Tokyo')->format('d/m G\h e'); // 15/09 0h Asia/Tokyo // You can find back which factory created a given object: $a = $factory->now(); @@ -1654,21 +1654,21 @@

Localization

$date = CarbonImmutable::now();
-echo $date->calendar();                                      // Today at 7:35 AM
+echo $date->calendar();                                      // Today at 8:26 PM
 echo "\n";
-echo $date->sub('1 day 3 hours')->calendar();                // Yesterday at 4:35 AM
+echo $date->sub('1 day 3 hours')->calendar();                // Yesterday at 5:26 PM
 echo "\n";
-echo $date->sub('3 days 10 hours 23 minutes')->calendar();   // Last Thursday at 9:12 PM
+echo $date->sub('3 days 10 hours 23 minutes')->calendar();   // Last Thursday at 10:03 AM
 echo "\n";
-echo $date->sub('8 days')->calendar();                       // 08/11/2024
+echo $date->sub('8 days')->calendar();                       // 09/07/2024
 echo "\n";
-echo $date->add('1 day 3 hours')->calendar();                // Tomorrow at 10:35 AM
+echo $date->add('1 day 3 hours')->calendar();                // Tomorrow at 11:26 PM
 echo "\n";
-echo $date->add('3 days 10 hours 23 minutes')->calendar();   // Thursday at 5:58 PM
+echo $date->add('3 days 10 hours 23 minutes')->calendar();   // Thursday at 6:49 AM
 echo "\n";
-echo $date->add('8 days')->calendar();                       // 08/27/2024
+echo $date->add('8 days')->calendar();                       // 09/23/2024
 echo "\n";
-echo $date->locale('fr')->calendar();                        // Aujourd’hui à 07:35
+echo $date->locale('fr')->calendar();                        // Aujourd’hui à 20:26
 

@@ -5588,7 +5588,7 @@

Testing Aids

var_dump(Carbon::hasTestNow()); // bool(true) Carbon::setTestNow(); // clear the mock var_dump(Carbon::hasTestNow()); // bool(false) -echo Carbon::now(); // 2024-08-19 07:35:06 +echo Carbon::now(); // 2024-09-15 20:26:52 // Instead of mock and clear mock, you also can use withTestNow(): Carbon::withTestNow('2010-09-15', static function () { @@ -5831,12 +5831,12 @@

Getters

// You can get any property dynamically too: $unit = 'second'; -var_dump(Carbon::now()->get($unit)); // int(6) +var_dump(Carbon::now()->get($unit)); // int(52) // equivalent to: -var_dump(Carbon::now()->$unit); // int(6) +var_dump(Carbon::now()->$unit); // int(52) // If you have plural unit name, use singularUnit() $unit = Carbon::singularUnit('seconds'); -var_dump(Carbon::now()->get($unit)); // int(6) +var_dump(Carbon::now()->get($unit)); // int(52) // Prefer using singularUnit() because some plurals are not the word with S: var_dump(Carbon::pluralUnit('century')); // string(9) "centuries" var_dump(Carbon::pluralUnit('millennium')); // string(9) "millennia" @@ -5912,23 +5912,23 @@

Weeks

var_dump($en->firstWeekDay); // int(0) var_dump($en->lastWeekDay); // int(6) -var_dump($en->startOfWeek()->format('Y-m-d H:i')); // string(16) "2024-08-18 00:00" -var_dump($en->endOfWeek()->format('Y-m-d H:i')); // string(16) "2024-08-24 23:59" +var_dump($en->startOfWeek()->format('Y-m-d H:i')); // string(16) "2024-09-15 00:00" +var_dump($en->endOfWeek()->format('Y-m-d H:i')); // string(16) "2024-09-21 23:59" echo "-----------\n"; // We still can force to use an other day as start/end of week $start = $en->startOfWeek(Carbon::TUESDAY); $end = $en->endOfWeek(Carbon::MONDAY); -var_dump($start->format('Y-m-d H:i')); // string(16) "2024-08-13 00:00" -var_dump($end->format('Y-m-d H:i')); // string(16) "2024-08-19 23:59" +var_dump($start->format('Y-m-d H:i')); // string(16) "2024-09-10 00:00" +var_dump($end->format('Y-m-d H:i')); // string(16) "2024-09-16 23:59" echo "-----------\n"; var_dump($ar->firstWeekDay); // int(6) var_dump($ar->lastWeekDay); // int(5) -var_dump($ar->startOfWeek()->format('Y-m-d H:i')); // string(16) "2024-08-17 00:00" -var_dump($ar->endOfWeek()->format('Y-m-d H:i')); // string(16) "2024-08-23 23:59" +var_dump($ar->startOfWeek()->format('Y-m-d H:i')); // string(16) "2024-09-14 00:00" +var_dump($ar->endOfWeek()->format('Y-m-d H:i')); // string(16) "2024-09-20 23:59" $en = CarbonImmutable::parse('2015-02-05'); // use en_US as default locale @@ -6413,8 +6413,8 @@

Comparison

// now is the default param $dt1 = Carbon::createMidnightDate(2000, 1, 1); -echo $dt1->max(); // 2024-08-19 07:35:06 -echo $dt1->maximum(); // 2024-08-19 07:35:06 +echo $dt1->max(); // 2024-09-15 20:26:52 +echo $dt1->maximum(); // 2024-09-15 20:26:52 // Remember min and max PHP native function work fine with dates too: echo max(Carbon::create('2002-03-15'), Carbon::create('2003-01-07'), Carbon::create('2002-08-25')); // 2003-01-07 00:00:00 @@ -6909,7 +6909,7 @@

Difference

greater than the other.

-

echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London')); // 2.0E-5
+    
echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London')); // 9.0E-6
 
 $dtOttawa = Carbon::createMidnightDate(2000, 1, 1, 'America/Toronto');
 $dtVancouver = Carbon::createMidnightDate(2000, 1, 1, 'America/Vancouver');
@@ -7048,10 +7048,10 @@ 

Difference

$date = Carbon::now()->addSeconds(3666); -echo $date->diffInSeconds(); // -3665.999811 -echo $date->diffInMinutes(); // -61.099994083333 -echo $date->diffInHours(); // -1.0183331869444 -echo $date->diffInDays(); // -0.042430547696759 +echo $date->diffInSeconds(); // -3665.999883 +echo $date->diffInMinutes(); // -61.099996533333 +echo $date->diffInHours(); // -1.0183332527778 +echo $date->diffInDays(); // -0.042430551273148 $date = Carbon::create(2016, 1, 5, 22, 40, 32); @@ -7706,7 +7706,7 @@

Macro

echo "\n"; echo Carbon::tomorrow()->formatForUser(); // Demain à 02:00 echo "\n"; -echo Carbon::now()->subDays(3)->formatForUser(); // vendredi dernier à 09:35 +echo Carbon::now()->subDays(3)->formatForUser(); // jeudi dernier à 22:26

@@ -7969,10 +7969,10 @@

Macro

echo substr(implode(', ', $dates), 0, 100).'...'; } -dumpDateList(Carbon::getCurrentWeekDays()); // 2024-08-19 00:00:00, 2024-08-20 00:00:00, 2024-08-21 00:00:00, 2024-08-22 00:00:00, 2024-08-23 00:00... -dumpDateList(Carbon::getCurrentMonthDays()); // 2024-08-01 00:00:00, 2024-08-02 00:00:00, 2024-08-03 00:00:00, 2024-08-04 00:00:00, 2024-08-05 00:00... -dumpDateList(Carbon::now()->subMonth()->getCurrentWeekDays()); // 2024-07-15 00:00:00, 2024-07-16 00:00:00, 2024-07-17 00:00:00, 2024-07-18 00:00:00, 2024-07-19 00:00... -dumpDateList(Carbon::now()->subMonth()->getCurrentMonthDays()); // 2024-07-01 00:00:00, 2024-07-02 00:00:00, 2024-07-03 00:00:00, 2024-07-04 00:00:00, 2024-07-05 00:00... +dumpDateList(Carbon::getCurrentWeekDays()); // 2024-09-09 00:00:00, 2024-09-10 00:00:00, 2024-09-11 00:00:00, 2024-09-12 00:00:00, 2024-09-13 00:00... +dumpDateList(Carbon::getCurrentMonthDays()); // 2024-09-01 00:00:00, 2024-09-02 00:00:00, 2024-09-03 00:00:00, 2024-09-04 00:00:00, 2024-09-05 00:00... +dumpDateList(Carbon::now()->subMonth()->getCurrentWeekDays()); // 2024-08-12 00:00:00, 2024-08-13 00:00:00, 2024-08-14 00:00:00, 2024-08-15 00:00:00, 2024-08-16 00:00... +dumpDateList(Carbon::now()->subMonth()->getCurrentMonthDays()); // 2024-08-01 00:00:00, 2024-08-02 00:00:00, 2024-08-03 00:00:00, 2024-08-04 00:00:00, 2024-08-05 00:00...

@@ -8951,7 +8951,7 @@

CarbonPeriod

$days[] = $date->format('Y-m-d'); } -echo implode(', ', $days); // 2024-08-19, 2024-08-20, 2024-08-21 +echo implode(', ', $days); // 2024-09-15, 2024-09-16, 2024-09-17

diff --git a/index.html b/index.html index 0d18226a8c..d7a56f1e98 100644 --- a/index.html +++ b/index.html @@ -214,26 +214,26 @@

Sponsors

- Онлайн казино - Best non Gamstop sites in the UK + Онлайн казино 777 + Best non Gamstop sites in the UK Real Money Pokies Non GamStop Bookies UK CasinoHex Canada - Best non Gamstop sites in the UK + Best non Gamstop sites in the UK Real Money Pokies Non GamStop Bookies UK - casinorevisor.com Sportsbook Reviews Online + Route4Me Route Planner Probukmacher Casino-portugal.pt + casinorevisor.com inkedin + Онлайн казино України OnlineCasinosSpelen Онлайн Казино Украины Guidebook.BetWinner - Онлайн казино України Non-GamStop Bets UK Online Kasyno Polis - Slots City
@@ -244,7 +244,6 @@

Backers

Online casino zonder CRUKS - DevITJobs.com jules Buy Crypto No Kyc UK Casino Gap @@ -256,57 +255,62 @@

Backers

Blastup BestKru Buy TikTok Followers - Casinos That Accept GamStop Players IT-Manuals Siti-Non-AAMS.bet Siti Non AAMS best cs2 keyboards meilleur jeux casino en ligne + Que Narras + Tomba.io + Coffee Saving

+ DevITJobs.com Proxidize Chudovo + Casinos That Accept GamStop Players Jämför försäkringar Hitta rabattkod SSSTwitter - Migliori Siti Non AAMS - OnlineCasinoProfy Triplebyte + OnlineCasinoProfy + Migliori Siti Non AAMS Hall Effect Game Controllers - matej_j Triplebyte Anna Filina + Kamol Chalermviriya + matej_j IgAnony GreenPromoCode.com Vancouver Coir - Kamol Chalermviriya - DevITJobs.uk - GermanTechJobs Instagram Story Viewer - Organic Social Boost - Wooting Alternatives AzuraCast Dolphin + Organic Social Boost + GermanTechJobs + DevITJobs.uk + Wooting Alternatives Runxi Ding + GitHub Sponsors Wagerbit GlitteringGenerality - GitHub Sponsors - TikTokFame - Sunset City Mushrooms Roberto Guido + Collins Agbonghama Real Targeted Traffic TargetedVisitors - Collins Agbonghama BB Creative Solutions - Instagram Story Viewer + TikTokFame + Sunset City Mushrooms People Search - IG Downloader + Instagram Story Viewer Salesforce + IG Downloader Bishop Bettini Alberto Fortin - Mike Healy Mike Healy + Mike Healy Markus Philipp Osvalds Ozolnieks