|
...
|
...
|
@@ -103,8 +103,8 @@ class countProject extends Command |
|
|
|
public function getMonthsBetween($startDate, $endDate)
|
|
|
|
{
|
|
|
|
// 创建 DateTime 对象
|
|
|
|
$start = new DateTime($startDate);
|
|
|
|
$end = new DateTime($endDate);
|
|
|
|
$start = new \DateTime($startDate);
|
|
|
|
$end = new \DateTime($endDate);
|
|
|
|
// 确保结束时间是该月份的最后一天,以包含结束月份
|
|
|
|
$end->modify('first day of next month');
|
|
|
|
// 用于存储所有月份
|
...
|
...
|
|