note 45508 deleted from function.strtotime by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 09 Sep 2004 20:27:26 +0000 |
| Subject: | note 45508 deleted from function.strtotime by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76354@lists.php.net to get a copy of this message | ||
Note Submitter: paul dot wright at tribalinternet dot co dot uk
----
Just a follow up to "me at samscam dot co dot uk" British date massager, there's a
typo in the code snippet ($temparr was set with the new date rather than $ourdate) - working code
therefore is:
if (preg_match("/\d{1,2}\/\d{1,2}(\/\d{2,4})?/",$ourdate)){
$temparr=explode("/",$ourdate);
$ourdate=$temparr[1]."/".$temparr[0]; // re-assemble the first part of the date
if ($temparr[2]){$ourdate.="/".$temparr[2];} // Add the year if used
}