From 07022bfb3f61091d990c56893cc91a43e9c94cbb Mon Sep 17 00:00:00 2001 From: kylekatarnls <5966783+kylekatarnls@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:26:58 +0000 Subject: [PATCH 1/2] Update documentation --- docs/index.html | 88 ++++++++++++++++++++++++------------------------- index.html | 2 +- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/docs/index.html b/docs/index.html index c7e1ec2ae..f789ade1d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -133,13 +133,13 @@
$now = Carbon::now();
-echo $now; // 2024-11-13 18:38:28
+echo $now; // 2024-11-15 00:26:57
echo "\n";
$today = Carbon::today();
-echo $today; // 2024-11-13 00:00:00
+echo $today; // 2024-11-15 00:00:00
echo "\n";
$tomorrow = Carbon::tomorrow('Europe/London');
-echo $tomorrow; // 2024-11-14 00:00:00
+echo $tomorrow; // 2024-11-16 00:00:00
echo "\n";
$yesterday = Carbon::yesterday();
-echo $yesterday; // 2024-11-12 00:00:00
+echo $yesterday; // 2024-11-14 00:00:00
@@ -451,7 +451,7 @@
$date = CarbonImmutable::now();
-echo $date->calendar(); // Today at 6:38 PM
+echo $date->calendar(); // Today at 12:26 AM
echo "\n";
-echo $date->sub('1 day 3 hours')->calendar(); // Yesterday at 3:38 PM
+echo $date->sub('1 day 3 hours')->calendar(); // Last Wednesday at 9:26 PM
echo "\n";
-echo $date->sub('3 days 10 hours 23 minutes')->calendar(); // Last Sunday at 8:15 AM
+echo $date->sub('3 days 10 hours 23 minutes')->calendar(); // Last Monday at 2:03 PM
echo "\n";
-echo $date->sub('8 days')->calendar(); // 11/05/2024
+echo $date->sub('8 days')->calendar(); // 11/07/2024
echo "\n";
-echo $date->add('1 day 3 hours')->calendar(); // Tomorrow at 9:38 PM
+echo $date->add('1 day 3 hours')->calendar(); // Tomorrow at 3:26 AM
echo "\n";
-echo $date->add('3 days 10 hours 23 minutes')->calendar(); // Sunday at 5:01 AM
+echo $date->add('3 days 10 hours 23 minutes')->calendar(); // Monday at 10:49 AM
echo "\n";
-echo $date->add('8 days')->calendar(); // 11/21/2024
+echo $date->add('8 days')->calendar(); // 11/23/2024
echo "\n";
-echo $date->locale('fr')->calendar(); // Aujourd’hui à 18:38
+echo $date->locale('fr')->calendar(); // Aujourd’hui à 00:26
@@ -5588,7 +5588,7 @@ -
echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London')); // 1.0E-5
+ echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London')); // 4.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.999868
-echo $date->diffInMinutes(); // -61.099996066667
-echo $date->diffInHours(); // -1.0183332433333
-echo $date->diffInDays(); // -0.042430550821759
+echo $date->diffInSeconds(); // -3665.999954
+echo $date->diffInMinutes(); // -61.099998516667
+echo $date->diffInHours(); // -1.0183332986111
+echo $date->diffInDays(); // -0.042430553703704
$date = Carbon::create(2016, 1, 5, 22, 40, 32);
@@ -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";}';
@@ -7706,7 +7706,7 @@ Macro
echo "\n";
echo Carbon::tomorrow()->formatForUser(); // Demain à 01:00
echo "\n";
-echo Carbon::now()->subDays(3)->formatForUser(); // dimanche dernier à 19:38
+echo Carbon::now()->subDays(3)->formatForUser(); // mardi dernier à 01:26
@@ -7971,7 +7971,7 @@ Macro
dumpDateList(Carbon::getCurrentWeekDays()); // 2024-11-11 00:00:00, 2024-11-12 00:00:00, 2024-11-13 00:00:00, 2024-11-14 00:00:00, 2024-11-15 00:00...
dumpDateList(Carbon::getCurrentMonthDays()); // 2024-11-01 00:00:00, 2024-11-02 00:00:00, 2024-11-03 00:00:00, 2024-11-04 00:00:00, 2024-11-05 00:00...
-dumpDateList(Carbon::now()->subMonth()->getCurrentWeekDays()); // 2024-10-07 00:00:00, 2024-10-08 00:00:00, 2024-10-09 00:00:00, 2024-10-10 00:00:00, 2024-10-11 00:00...
+dumpDateList(Carbon::now()->subMonth()->getCurrentWeekDays()); // 2024-10-14 00:00:00, 2024-10-15 00:00:00, 2024-10-16 00:00:00, 2024-10-17 00:00:00, 2024-10-18 00:00...
dumpDateList(Carbon::now()->subMonth()->getCurrentMonthDays()); // 2024-10-01 00:00:00, 2024-10-02 00:00:00, 2024-10-03 00:00:00, 2024-10-04 00:00:00, 2024-10-05 00:00...
@@ -8951,7 +8951,7 @@ CarbonPeriod
$days[] = $date->format('Y-m-d');
}
-echo implode(', ', $days); // 2024-11-13, 2024-11-14, 2024-11-15
+echo implode(', ', $days); // 2024-11-15, 2024-11-16, 2024-11-17
diff --git a/index.html b/index.html
index b0fb1e1c4..52446ac1a 100644
--- a/index.html
+++ b/index.html
@@ -319,11 +319,11 @@