Skip to content

Commit

Permalink
fix #360: keep php7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez committed Apr 14, 2023
1 parent e89caa6 commit db21f70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base.php
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,10 @@ function_exists('money_format') &&
$dateType=(empty($mod) || $mod=='short') ? IntlDateFormatter::SHORT :
($mod=='full' ? IntlDateFormatter::FULL : IntlDateFormatter::LONG);
$pattern = $dateType === IntlDateFormatter::SHORT
? IntlDatePatternGenerator::create($lang[0])?->getBestPattern('YYYYMMdd') : null;
? (($pt=IntlDatePatternGenerator::create($lang[0]))
? $pn->getBestPattern('YYYYMMdd') : null) : null;
$formatter = new IntlDateFormatter($lang[0],$dateType,
IntlDateFormatter::NONE, pattern: $pattern);
IntlDateFormatter::NONE, null,null, $pattern);
return $formatter->format($args[$pos]);
} else {
if (empty($mod) || $mod=='short')
Expand Down

0 comments on commit db21f70

Please sign in to comment.