diff options
Diffstat (limited to 'MLEB/Translate/src/Statistics/TranslationStatsBase.php')
-rw-r--r-- | MLEB/Translate/src/Statistics/TranslationStatsBase.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MLEB/Translate/src/Statistics/TranslationStatsBase.php b/MLEB/Translate/src/Statistics/TranslationStatsBase.php index 3960231d..8c150a2a 100644 --- a/MLEB/Translate/src/Statistics/TranslationStatsBase.php +++ b/MLEB/Translate/src/Statistics/TranslationStatsBase.php @@ -30,7 +30,9 @@ abstract class TranslationStatsBase implements TranslationStatsInterface { public function getDateFormat() { $dateFormat = 'Y-m-d'; $scale = $this->opts->getValue( 'scale' ); - if ( $scale === 'months' ) { + if ( $scale === 'years' ) { + $dateFormat = 'Y'; + } elseif ( $scale === 'months' ) { $dateFormat = 'Y-m'; } elseif ( $scale === 'weeks' ) { $dateFormat = 'Y-\WW'; @@ -73,5 +75,3 @@ abstract class TranslationStatsBase implements TranslationStatsInterface { return array_keys( $namespaces ); } } - -class_alias( TranslationStatsBase::class, '\MediaWiki\Extensions\Translate\TranslationStatsBase' ); |