note 50183 deleted from function.date by tularis
| From: | tularis@php.net | Date: | Mon, 21 Feb 2005 12:30:54 +0000 |
| Subject: | note 50183 deleted from function.date by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-85303@lists.php.net to get a copy of this message | ||
Note Submitter: ildar hyphen sh at mail dot ru
Reason: useless
----
may be this function is the more flexible realization of the example 3 of manual
function timestep($name, $step)
{
static $x = array(
'year' => 'year',
'month' => 'mon',
'day' => 'mday',
'hour' => 'hours',
'minute' => 'minutes',
'second' => 'seconds'
);
if (!isset($x[$name])) return false;
$now = getdate();
$now[$x[$name]] += $step;
return mktime(
$now['hours'],
$now['minutes'],
$now['seconds'],
$now['mon'],
$now['mday'],
$now['year']
);
}