Skip to content

Commit

Permalink
Select the month before if today is the first
Browse files Browse the repository at this point in the history
  • Loading branch information
God Mod committed Apr 1, 2015
1 parent e651a4d commit c17154e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions admin/statistics.php
Expand Up @@ -168,6 +168,12 @@ public function display($messages=array()){

$date_from = $this->time->mktime(0, 0, 0, $m, 1, $y);
$date_to = $this->time->mktime(0, 0, 0, $m, $d, $y);
if($date_from == $date_to){
if($m > 1) $m = $m-1;
$date_from = $this->time->mktime(0, 0, 0, $m, 1, $y);
}


$_date_from = $this->time->user_date($date_from , false, false, false, function_exists('date_create_from_format'));
$_date_to = $this->time->user_date($date_to , false, false, false, function_exists('date_create_from_format'));

Expand Down

0 comments on commit c17154e

Please sign in to comment.