正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -103,8 +103,8 @@ class countProject extends Command | @@ -103,8 +103,8 @@ class countProject extends Command | ||
| 103 | public function getMonthsBetween($startDate, $endDate) | 103 | public function getMonthsBetween($startDate, $endDate) |
| 104 | { | 104 | { |
| 105 | // 创建 DateTime 对象 | 105 | // 创建 DateTime 对象 |
| 106 | - $start = new DateTime($startDate); | ||
| 107 | - $end = new DateTime($endDate); | 106 | + $start = new \DateTime($startDate); |
| 107 | + $end = new \DateTime($endDate); | ||
| 108 | // 确保结束时间是该月份的最后一天,以包含结束月份 | 108 | // 确保结束时间是该月份的最后一天,以包含结束月份 |
| 109 | $end->modify('first day of next month'); | 109 | $end->modify('first day of next month'); |
| 110 | // 用于存储所有月份 | 110 | // 用于存储所有月份 |
-
请 注册 或 登录 后发表评论