note 105993 added to dateinterval.format
| From: | bruno at jehaisleprintemps dot net | Date: | Fri, 30 Sep 2011 13:37:18 +0000 |
| Subject: | note 105993 added to dateinterval.format | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183544@lists.php.net to get a copy of this message | ||
Nice one, kuzb, except that your "to_seconds()" function is missing the minute factor.
<?php
function to_seconds()
{
return ($this->y * 365 * 24 * 60 * 60) +
($this->m * 30 * 24 * 60 * 60) +
($this->d * 24 * 60 * 60) +
($this->h * 60 *60) +
($this->i * 60) +
$this->s;
}
?>
----
Server IP: 192.41.42.26
Probable Submitter: 217.108.83.254 (proxied: 135.25.11.249)
----
Manual Page -- http://www.php.net/manual/en/dateinterval.format.php
Edit -- https://master.php.net/note/edit/105993
Del: integrated -- https://master.php.net/note/delete/105993/integrated
Del: useless -- https://master.php.net/note/delete/105993/useless
Del: bad code -- https://master.php.net/note/delete/105993/bad+code
Del: spam -- https://master.php.net/note/delete/105993/spam
Del: non-english -- https://master.php.net/note/delete/105993/non-english
Del: in docs -- https://master.php.net/note/delete/105993/in+docs
Del: other reasons-- https://master.php.net/note/delete/105993
Reject -- https://master.php.net/note/reject/105993
Search -- https://master.php.net/manage/user-notes.php