Fix bug: default date format

This commit is contained in:
Frédéric Guillot
2014-01-25 15:51:48 -05:00
parent 9383a15af6
commit d5e4289820

View File

@@ -34,14 +34,12 @@ namespace Translator {
$str = ''; $str = '';
if ($position === 'before') { if ($position === 'before') {
$str .= $symbol; $str .= $symbol;
} }
$str .= number($amount); $str .= number($amount);
if ($position === 'after') { if ($position === 'after') {
$str .= ' '.$symbol; $str .= ' '.$symbol;
} }
@@ -50,7 +48,7 @@ namespace Translator {
function datetime($format, $timestamp) function datetime($format, $timestamp)
{ {
return strftime(get($format), (int) $timestamp); return strftime(get($format, $format), (int) $timestamp);
} }
function get($identifier, $default = '') function get($identifier, $default = '')
@@ -58,11 +56,9 @@ namespace Translator {
$locales = container(); $locales = container();
if (isset($locales[$identifier])) { if (isset($locales[$identifier])) {
return $locales[$identifier]; return $locales[$identifier];
} }
else { else {
return $default; return $default;
} }
} }