/**
* @param string $str
- * @param bool $forContent
+ * @param User $user User object to use timezone from or null for $wgUser
* @return string
*/
- function translateBlockExpiry( $str, $forContent = false ) {
+ function translateBlockExpiry( $str, User $user = null ) {
/*
'ago', 'now', 'today', 'this', 'next',
'first', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth',
'jul:heinäkuu,aug:elokuu,sep:syyskuu,oct:lokakuu,nov:marraskuu,' .
dec:joulukuu,sept:syyskuu';
*/
- $weekds = array(
+ $weekds = [
'monday' => 'maanantai',
'tuesday' => 'tiistai',
'wednesday' => 'keskiviikko',
'year' => 'vuosi',
'infinite' => 'ikuisesti',
'indefinite' => 'ikuisesti'
- );
+ ];
$final = '';
$tokens = explode( ' ', $str );