PHP DateTime format and DateInterval format
I will never understand the inconsistency in PHP's API.
Why do I have to use the percent when formatting the output of a DateInterval object, but I don't have to use the percent when formatting the output of a DateTime object!
$dt = new DateTime(); $di = new DateInterval( "PT1H" ); echo $dt->format( '%H:%i:%s' ); echo $di->format( 'H:i:s' );
For the future I really like to stick more to node.js as JavaScript Style of doing things is far more pleasant and convenient...











