Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/200534

Change subject: CXStats: Make the graph labels week end dates instead of start 
dates
......................................................................

CXStats: Make the graph labels week end dates instead of start dates

Change-Id: Idefd37083d2dd6161f6b309a082c096bdd9d26ff
---
M includes/Translation.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/34/200534/1

diff --git a/includes/Translation.php b/includes/Translation.php
index bb12a52..7055709 100644
--- a/includes/Translation.php
+++ b/includes/Translation.php
@@ -255,9 +255,9 @@
                foreach ( $rows as $row ) {
                        $result[] = array(
                                'date' => $interval === 'week' ?
-                                       // Week start date
-                                       date( 'Y-m-d', strtotime( $row->date . 
' - ' .
-                                               date( 'w', strtotime( 
$row->date ) ) . ' days' ) ) :
+                                       // Week end date
+                                       date( 'Y-m-d', strtotime( $row->date . 
' + ' .
+                                               ( 6 - date( 'w', strtotime( 
$row->date ) ) ) . ' days' ) ) :
                                        date( 'Y-m', strtotime( $row->date ) ),
                                'count' => $row->translatons_count,
                        );

-- 
To view, visit https://gerrit.wikimedia.org/r/200534
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idefd37083d2dd6161f6b309a082c096bdd9d26ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to