note 70285 added to function.idate

From: Date: Tue, 10 Oct 2006 11:26:11 +0000
Subject: note 70285 added to function.idate
Groups: php.notes 
Request: Send a blank email to php-notes+get-118336@lists.php.net to get a copy of this message
<? // idate() for PHP < 5 // Sanity check if (!is_callable('idate')) { function idate($char, $ts = false) { if ($ts === false) { $ts = time(); } else if (!is_numeric($ts)) { return false; } $char = $char{0}; if ($char == 'B') { // Swatch time ignores the $ts argument. return ((int) ((gmdate('U') + 3600) * (1000 / 86400))) % 1000; } else { return (int) date($char, $ts); // Drop leading zeroes by casting into an integer. } } } ?> ---- Server IP: 66.33.208.18 Probable Submitter: 71.35.197.135 ---- Manual Page -- http://www.php.net/manual/en/function.idate.php Edit -- https://master.php.net/note/edit/70285 Del: integrated -- https://master.php.net/note/delete/70285/integrated Del: useless -- https://master.php.net/note/delete/70285/useless Del: bad code -- https://master.php.net/note/delete/70285/bad+code Del: spam -- https://master.php.net/note/delete/70285/spam Del: non-english -- https://master.php.net/note/delete/70285/non-english Del: in docs -- https://master.php.net/note/delete/70285/in+docs Del: other reasons-- https://master.php.net/note/delete/70285 Reject -- https://master.php.net/note/reject/70285 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118336) next »