note 93152 added to function.mktime

From: Date: Tue, 25 Aug 2009 21:56:45 +0000
Subject: note 93152 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-159890@lists.php.net to get a copy of this message
@ 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; } ---- Server IP: 216.235.13.26 Probable Submitter: 216.239.82.164 ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- https://master.php.net/note/edit/93152 Del: integrated -- https://master.php.net/note/delete/93152/integrated Del: useless -- https://master.php.net/note/delete/93152/useless Del: bad code -- https://master.php.net/note/delete/93152/bad+code Del: spam -- https://master.php.net/note/delete/93152/spam Del: non-english -- https://master.php.net/note/delete/93152/non-english Del: in docs -- https://master.php.net/note/delete/93152/in+docs Del: other reasons-- https://master.php.net/note/delete/93152 Reject -- https://master.php.net/note/reject/93152 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#159890) next »