MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/332805 )
Change subject: Make most methods in DateFormatter private ...................................................................... Make most methods in DateFormatter private As discussed in https://gerrit.wikimedia.org/r/#/c/332702/ , they shouldn't have been marked public in the first place. No outside callers. Change-Id: I7775978c87d983784a484ee2ad901d25c42499b3 --- M includes/parser/DateFormatter.php 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/332805/1 diff --git a/includes/parser/DateFormatter.php b/includes/parser/DateFormatter.php index 40da368..5fbd64c 100644 --- a/includes/parser/DateFormatter.php +++ b/includes/parser/DateFormatter.php @@ -225,7 +225,7 @@ * @param bool $link * @return string */ - public function formatDate( $bits, $link = true ) { + private function formatDate( $bits, $link = true ) { $format = $this->targets[$this->mTarget]; if ( !$link ) { @@ -323,7 +323,7 @@ * Return a regex that can be used to find month names in string * @return string regex to find the months with */ - public function getMonthRegex() { + private function getMonthRegex() { $names = []; for ( $i = 1; $i <= 12; $i++ ) { $names[] = $this->lang->getMonthName( $i ); @@ -337,7 +337,7 @@ * @param string $monthName Month name * @return string ISO month name */ - public function makeIsoMonth( $monthName ) { + private function makeIsoMonth( $monthName ) { $n = $this->xMonths[$this->lang->lc( $monthName )]; return sprintf( '%02d', $n ); } @@ -347,7 +347,7 @@ * @param string $year Year name * @return string ISO year name */ - public function makeIsoYear( $year ) { + private function makeIsoYear( $year ) { # Assumes the year is in a nice format, as enforced by the regex if ( substr( $year, -2 ) == 'BC' ) { $num = intval( substr( $year, 0, -3 ) ) - 1; @@ -366,7 +366,7 @@ * @return int|string int representing year number in case of AD dates, or string containing * year number and 'BC' at the end otherwise. */ - public function makeNormalYear( $iso ) { + private function makeNormalYear( $iso ) { if ( $iso[0] == '-' ) { $text = ( intval( substr( $iso, 1 ) ) + 1 ) . ' BC'; } else { -- To view, visit https://gerrit.wikimedia.org/r/332805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7775978c87d983784a484ee2ad901d25c42499b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MaxSem <maxsem.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits