* [refac] optimize code.

This commit is contained in:
tianshujie
2025-09-04 10:33:01 +08:00
parent 7c0f4f0105
commit b6fd370dbd
+1 -1
View File
@@ -217,7 +217,7 @@ class date
$year = $thisMonth == 12 ? $thisYear + 1 : $thisYear;
$month = $thisMonth == 12 ? 1 : $thisMonth + 1;
$begin = "{$year}-{$month}-01 00:00:00";
$end = date('Y-m-d 23:59:59', strtotime("$begin +1 month -1 day"));
$end = date("{$year}-{$month}-t 23:59:59", strtotime($begin));
return array('begin' => $begin, 'end' => $end);
}