📜  星期几使用碳库 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:43.126000             🧑  作者: Mango

代码示例1
// 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');