day of week using carbon library

Solutions on MaxInterview for day of week using carbon library by the best coders in the world

showing results for - "day of week using carbon library"
Florencia
25 Jan 2018
1// CALCULATE DAY OF WEEK (USING CARBON LIBRARY Laravel)
2
3use Carbon\Carbon;
4
5// pass dynamic day
6$date = "2021-5-18";
7$day  = new DateTime($date);
8$dayOfWeek = $day->format('l');