Fix bug: default date format
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user