Skip to content

Commit

Permalink
Merge pull request #3085 from briannesbitt/update-documentation
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
kylekatarnls authored Oct 14, 2024
2 parents 2e87f0f + f46fe47 commit 1f899ec
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
16 changes: 8 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5786,7 +5786,7 @@ <h1 id="api-getters">Getters</h1>

// 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"]=>
Expand Down Expand Up @@ -6176,7 +6176,7 @@ <h1 id="api-conversion">Conversion</h1>
["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"]=>
Expand All @@ -6189,7 +6189,7 @@ <h1 id="api-conversion">Conversion</h1>

var_dump($dt->toObject());
/*
object(stdClass)#1092 (12) {
object(stdClass)#1096 (12) {
["year"]=>
int(2019)
["month"]=>
Expand All @@ -6213,7 +6213,7 @@ <h1 id="api-conversion">Conversion</h1>
["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"]=>
Expand All @@ -6226,7 +6226,7 @@ <h1 id="api-conversion">Conversion</h1>

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"]=>
Expand All @@ -6240,7 +6240,7 @@ <h1 id="api-conversion">Conversion</h1>
// 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"]=>
Expand Down Expand Up @@ -7574,9 +7574,9 @@ <h1 id="api-serialization">Serialization</h1>
<p>
<pre><code class="php">$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";}';

Expand Down
Loading

0 comments on commit 1f899ec

Please sign in to comment.