Answers for "Day of Week Using carbon library"

PHP
0

Day of Week Using carbon library

// CALCULATE DAY OF WEEK (USING CARBON LIBRARY Laravel)

use Carbon\Carbon;

// pass dynamic day
$date = "2021-5-18";
$day  = new DateTime($date);
$dayOfWeek = $day->format('l');
Posted by: Guest on March-05-2021

Browse Popular Code Answers by Language