📜  日期数组 laravel - PHP 代码示例

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

代码示例1
$period = CarbonPeriod::create('2018-06-14', '2018-06-20');

// Iterate over the period
foreach ($period as $date) {
    echo $date->format('Y-m-d');
}

// Convert the period to an array of dates
$dates = $period->toArray();