$dt = Carbon::now();
dd($dt->startOfDay(), $dt->endOfDay());
Carbon {#324 ▼
+"date": "2017-05-15 23:59:59.000000"
+"timezone_type": 3
+"timezone": "Europe/Paris"
}
Carbon {#324 ▼
+"date": "2017-05-15 23:59:59.000000"
+"timezone_type": 3
+"timezone": "Europe/Paris"
}
First variable is the date and hour actually, dd() function is for display content of variables.
startOfDay() method give me the same thing of the endOfDay() method...
$dt = Carbon::now(); $dt2 = Carbon::now(); dd($dt->startOfDay(), $dt2->endOfDay());
Just curious what the result will be. – Unship