Skip to content

Commit

Permalink
fix broken custom date/time formatting, bcosca/fatfree#1147
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez committed Nov 25, 2019
1 parent 45a7c5b commit c7b815c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions base.php
Original file line number Diff line number Diff line change
Expand Up @@ -1026,16 +1026,18 @@ function_exists('money_format'))
($frac?strlen($frac)-2:0),
$decimal_point,$thousands_sep);
case 'date':
$prop='%d %B %Y';
if (empty($mod) || $mod=='short')
$prop='%x';
elseif ($mod=='full')
$prop='%A, '.$prop;
$prop='%A, %d %B %Y';
elseif ($mod!='custom')
$prop='%d %B %Y';
return strftime($prop,$args[$pos]);
case 'time':
$prop='%r';
if (empty($mod) || $mod=='short')
$prop='%X';
elseif ($mod!='custom')
$prop='%r';
return strftime($prop,$args[$pos]);
default:
return $expr[0];
Expand Down

0 comments on commit c7b815c

Please sign in to comment.