CakePHP's CakeTime format for minutes -


i don't understand result of caketime::format when using %i.

debug(caketime::format('2014-01-10 15:00:00', '%y-%m-%d %h:%i')); outputs false

debug(caketime::format('2014-01-10 15:00:00', '%y-%m-%d %h:xx')); outputs 2014-01-10 15:xx

what correct format minutes?

from documentation

the formatting uses option strftime. , "m" right parameter minute, @user2711870 said.

however, cakephp documentation wrong:

// called via timehelper echo $this->time->format('%f %js, %y %h:%i %a', '2011-08-22 11:53:00'); // august 22nd, 2011 11:53 

this should be

echo $this->time->format('2011-08-22 11:53:00', '%f %js, %y %h:%m %a'); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -