exit( 1 );
}
-mb_internal_encoding( 'UTF-8' );
-
use CLDRPluralRuleParser\Evaluator;
/**
* @throws MWException
* @return string
*/
- public function sprintfDate( $format, $ts, DateTimeZone $zone = null, &$ttl = null ) {
+ public function sprintfDate( $format, $ts, DateTimeZone $zone = null, &$ttl = 'unused' ) {
$s = '';
$raw = false;
$roman = false;
}
}
- if ( $usedSecond ) {
+ if ( $ttl === 'unused' ) {
+ // No need to calculate the TTL, the caller wont use it anyway.
+ } elseif ( $usedSecond ) {
$ttl = 1;
} elseif ( $usedMinute ) {
$ttl = 60 - substr( $ts, 12, 2 );