50 if ( !$chosenIntervals ) {
51 $chosenIntervals = [
'centuries',
'years',
'days',
'hours',
'minutes',
'seconds' ];
54 $intervals = $this->getDurationIntervals( $seconds, $chosenIntervals );
58 foreach ( $intervals as $intervalName => $intervalValue ) {
61 $message =
wfMessage(
'duration-' . $intervalName )->numParams( $intervalValue );
62 $segments[] = $message->inLanguage( $this )->escaped();
65 return implode(
'', $segments );