note 50183 added to function.date

From: Date: Mon, 21 Feb 2005 11:24:42 +0000
Subject: note 50183 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-85302@lists.php.net to get a copy of this message
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'] ); } ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50183 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50183&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50183&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50183&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50183&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50183&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50183&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85302) next »