作者 lyh

gx脚本统计数据

@@ -126,7 +126,7 @@ class countProject extends Command @@ -126,7 +126,7 @@ class countProject extends Command
126 */ 126 */
127 public function getStartAndEndOfMonth($month) { 127 public function getStartAndEndOfMonth($month) {
128 // 创建指定月份的 DateTime 对象 128 // 创建指定月份的 DateTime 对象
129 - $start = new DateTime($month . '-01'); // 月份的第一天 129 + $start = new \DateTime($month . '-01'); // 月份的第一天
130 // 复制开始日期并获取该月的最后一天 130 // 复制开始日期并获取该月的最后一天
131 $end = clone $start; 131 $end = clone $start;
132 $end->modify('last day of this month'); // 修改为该月的最后一天 132 $end->modify('last day of this month'); // 修改为该月的最后一天