Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
minor #94 removed unnecessary locale check (Trainmaster)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

removed unnecessary locale check

If $locale === NULL, the default locale is used. See the php-src: https://github.com/php/php-src/blob/master/ext/intl/formatter/formatter_main.c#L58-L60

Commits
-------

4be3a42 removed unnecessary locale check
  • Loading branch information
fabpot committed Oct 18, 2013
2 parents 3604161 + 4be3a42 commit 07d7360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Twig/Extensions/Extension/Intl.php
Expand Up @@ -54,7 +54,7 @@ function twig_localized_date_filter(Twig_Environment $env, $date, $dateFormat =
);

$formatter = IntlDateFormatter::create(
$locale !== null ? $locale : Locale::getDefault(),
$locale,
$formatValues[$dateFormat],
$formatValues[$timeFormat],
$date->getTimezone()->getName(),
Expand Down

0 comments on commit 07d7360

Please sign in to comment.