note 99328 rejected from function.date by danbrown

From: Date: Wed, 11 Aug 2010 13:48:27 +0000
Subject: note 99328 rejected from function.date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-171567@lists.php.net to get a copy of this message
Note Submitter: Addy ---- 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;

« previous php.notes (#171567) next »