note 93152 deleted from function.mktime by danbrown

From: Date: Tue, 25 Aug 2009 22:09:23 +0000
Subject: note 93152 deleted from function.mktime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159891@lists.php.net to get a copy of this message
Note Submitter: sean at crazyhorsecoding dot com ---- @ Alan: i hear ya brother! this might help. It's a function i include whenever i am doing a lot of work with dates: function makestamp($dy=NULL,$dm=NULL,$dd=NULL,$th=NULL,$tm=NULL,$ts=NULL) { // make a timestamp in a more sensical way than mktime() // @params all integers. all optional. From Year down to Second // @return int timestamp // goes like this: year,month,day,hour,minute,second if (is_null($dy)) $dy = date('Y'); if (is_null($dm)) $dm = date('n'); if (is_null($dd)) $dd = date('j'); if (is_null($th)) $th = date('H'); if (is_null($tm)) $tm = date('i'); if (is_null($ts)) $ts = date('s'); $o = mktime($th,$tm,$ts,$dm,$dd,$dy); return $o; }

« previous php.notes (#159891) next »