作者 lyh

gx脚本统计数据

@@ -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 // 用于存储所有月份