Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Reuse existing date formats in MwTimeIsoFormatter
......................................................................

Reuse existing date formats in MwTimeIsoFormatter

This is an alternative approach for the suggested change in Ic7a5797.

Warning, this requires I232fd3b to be merged first!

Change-Id: Id09e26e78e6733d7de63e5dbadebe8821a9f4556
---
M lib/includes/formatters/MwTimeIsoFormatter.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/41/148641/1

diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php 
b/lib/includes/formatters/MwTimeIsoFormatter.php
index 2c71732..e6d0fcd 100644
--- a/lib/includes/formatters/MwTimeIsoFormatter.php
+++ b/lib/includes/formatters/MwTimeIsoFormatter.php
@@ -123,10 +123,12 @@
                }
 
                if ( $precision === TimeValue::PRECISION_MONTH ) {
-                       return 'F Y';
+                       $format = $this->language->getDateFormatString( 
'monthonly', 'dmy' );
+                       return $format ?: 'F Y';
                }
 
-               return 'j F Y';
+               $format = $this->language->getDateFormatString( 'date', 'dmy' );
+               return $format ?: 'j F Y';
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id09e26e78e6733d7de63e5dbadebe8821a9f4556
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to