mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Use whole days in Differential stats
Test Plan: /differential/stats/revisions/ Reviewers: vii, jungejason, epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2867
This commit is contained in:
parent
da45b09bb4
commit
665769d505
1 changed files with 3 additions and 4 deletions
|
@ -90,7 +90,7 @@ final class DifferentialRevisionStatsView extends AphrontView {
|
|||
$revisions_seen[$rev_id] = true;
|
||||
|
||||
foreach ($dates as $age => $cutoff) {
|
||||
if ($cutoff > $rev_date) {
|
||||
if ($cutoff >= $rev_date) {
|
||||
continue;
|
||||
}
|
||||
if ($rev) {
|
||||
|
@ -105,10 +105,9 @@ final class DifferentialRevisionStatsView extends AphrontView {
|
|||
|
||||
$old_count = 0;
|
||||
foreach (array_reverse($dates) as $age => $cutoff) {
|
||||
$weeks = ($now - $cutoff + 0.) / (7 * 60 * 60 * 24);
|
||||
$weeks = ceil(($now - $cutoff) / (60 * 60 * 24)) / 7;
|
||||
if ($old_count == $counts[$age] && count($row_array) == 1) {
|
||||
end($row_array);
|
||||
unset($dates[key($row_array)]);
|
||||
unset($dates[last_key($row_array)]);
|
||||
$row_array = array();
|
||||
}
|
||||
$old_count = $counts[$age];
|
||||
|
|
Loading…
Reference in a new issue