note 87691 added to function.getdate
| From: | eric dot schultz at NOSPAM dot CyVon dot com | Date: | Wed, 17 Dec 2008 02:33:50 +0000 |
| Subject: | note 87691 added to function.getdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148239@lists.php.net to get a copy of this message | ||
Here is another gmgetdate that is a little faster/suscint (no loops).
<?
function gmgetdate2($ts = null){
$k = array('seconds','minutes','hours','mday',
'wday','mon','year','yday','weekday','month',0);
return(array_combine($k,split(":",
gmdate('s:i:G:j:w:n:Y:z:l:F:U',is_null($ts)?time():$ts))));
}
?>
It also returns the values in the same order as getdate.
----
Server IP: 209.41.74.194
Probable Submitter: 67.184.185.14
----
Manual Page -- http://www.php.net/manual/en/function.getdate.php
Edit -- https://master.php.net/note/edit/87691
Del: integrated -- https://master.php.net/note/delete/87691/integrated
Del: useless -- https://master.php.net/note/delete/87691/useless
Del: bad code -- https://master.php.net/note/delete/87691/bad+code
Del: spam -- https://master.php.net/note/delete/87691/spam
Del: non-english -- https://master.php.net/note/delete/87691/non-english
Del: in docs -- https://master.php.net/note/delete/87691/in+docs
Del: other reasons-- https://master.php.net/note/delete/87691
Reject -- https://master.php.net/note/reject/87691
Search -- https://master.php.net/manage/user-notes.php