* Fix end date bug
This commit is contained in:
@@ -195,7 +195,7 @@ class date
|
||||
public static function getThisMonth()
|
||||
{
|
||||
$begin = date('Y-m') . '-01 00:00:00';
|
||||
$end = date('Y-m', strtotime('next month')) . '-00 23:59:59';
|
||||
$end = date('Y-m-d 23:59:59', strtotime("$begin +1 month -1 day"));
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ class date
|
||||
public static function getLastMonth()
|
||||
{
|
||||
$begin = date('Y-m', strtotime('last month', strtotime(date('Y-m',time()) . '-01 00:00:01'))) . '-01 00:00:00';
|
||||
$end = date('Y-m', strtotime('this month')) . '-00 23:59:59';
|
||||
$end = date('Y-m-d 23:59:59', strtotime(date('Y-m-01') . ' -1 day'));
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user