note 99328 added to function.date
| From: | Addy at osu1 dot php dot net | Date: | Wed, 11 Aug 2010 06:01:26 +0000 |
| Subject: | note 99328 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171562@lists.php.net to get a copy of this message | ||
Will this script can have the leap year & time zone problem?
$text = array("year", "month", "day", "hour",
"minute", "second");
$org = explode("-", date("Y-m-d-H-i-s", 0));
$cur = explode("-", date("Y-m-d-H-i-s", (time() - $d)));
$org_count = count($org);
for($i=0; $i<$org_count; $i++)
{
$data[$i] = ($cur[$i] - $org[$i]);
$output .= ($data[$i] != 0) ? " " . $data[$i] . " " . $text[$i] :
"";
}
return $output;
----
Server IP: 69.147.83.197
Probable Submitter: 124.193.80.222
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/99328
Del: integrated -- https://master.php.net/note/delete/99328/integrated
Del: useless -- https://master.php.net/note/delete/99328/useless
Del: bad code -- https://master.php.net/note/delete/99328/bad+code
Del: spam -- https://master.php.net/note/delete/99328/spam
Del: non-english -- https://master.php.net/note/delete/99328/non-english
Del: in docs -- https://master.php.net/note/delete/99328/in+docs
Del: other reasons-- https://master.php.net/note/delete/99328
Reject -- https://master.php.net/note/reject/99328
Search -- https://master.php.net/manage/user-notes.php