$beginDate = date('Y-m-01', strtotime(date("2021-03")));
$endDate = date('Y-m-d', strtotime("$beginDate +1 month -1 day"));
月初:2021-03-01; 月末:2021-03-31
$beginDate = date('Y-m-01', strtotime(date("2021-03")));
$endDate = date('Y-m-d', strtotime("$beginDate +1 month -1 day"));
月初:2021-03-01; 月末:2021-03-31