note 57583 modified in function.time by aidan
| From: | aidan@php.net | Date: | Thu, 16 Nov 2006 02:24:24 +0000 |
| Subject: | note 57583 modified in function.time by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119768@lists.php.net to get a copy of this message | ||
* A simple function for calculating the number of seconds, minutes, etc in a timestamp is here:
http://aidanlister.com/repos/v/Duration.php
Example:
<?php
$time = 60*60*2 + 20*60 + 5;
// Gives 2 hours, 20 minutes, 5 seconds
echo Duration::toString($time);
?>
* For manipulating arbitrary format, or length timestamps, see the PEAR::Date class.
http://pear.php.net/package/Date/
* PHP 6 will be shipping a new inbuilt date and timestamp manipulation API. It's available on
PECL here:
http://pecl.php.net/package/datetime
--was--
* A simple function for calculating the number of seconds, minutes, etc in a timestamp is here:
http://aidan.dotgeek.org/repos/?file=Duration.php
Example:
<?php
$time = 60*60*2 + 20*60 + 5;
// Gives 2 hours, 20 minutes, 5 seconds
echo Duration::toString($time);
?>
* For manipulating arbitrary format, or length timestamps, see the PEAR::Date class.
http://pear.php.net/package/Date/
* PHP 6 will be shipping a new inbuilt date and timestamp manipulation API. It's available on
PECL here:
http://pecl.php.net/package/date_time
http://php.net/manual/en/function.time.php