Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php |
— | — | @@ -47,8 +47,11 @@ |
48 | 48 | if ( $params['startmonth'] && !$params['endmonth'] ) { |
49 | 49 | $query['conds']['date'] = $params['startmonth']; |
50 | 50 | } else { |
| 51 | + //add 1 month to end of date because of the way data is stored |
| 52 | + $endMonth = date( "Y-m-d", strtotime( $params['endmonth'] . " +1 month" ) ); |
| 53 | + |
51 | 54 | $query['conds'][] = "date >= ". $db->addQuotes( $params['startmonth'] ) |
52 | | - . " AND date <= " . $db->addQuotes( $params['endmonth'] ) ; |
| 55 | + . " AND date <= " . $db->addQuotes( $endMonth ) ; |
53 | 56 | } |
54 | 57 | |
55 | 58 | // TODO: Data formatting |