note 97195 added to function.strtotime

From: Date: Thu, 08 Apr 2010 00:31:33 +0000
Subject: note 97195 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-167997@lists.php.net to get a copy of this message
Here is a basic example of a version that works for people outside of the US: <?php function strtotime_nonus($date) { if(is_null($date) or ($date == "")) return False; // break out components with '/', maximum of 3 elements $components = explode("/", $date, 3); $count = count($components); if($count > 1) // There is a slash { $tmp = $components[0]; // Swap first and second components $components[0] = $components[1]; $components[1] = $tmp; } return strtotime(implode("/",$components)); // Put back together } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 203.34.169.48 (proxied: 130.111.30.195) ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- https://master.php.net/note/edit/97195 Del: integrated -- https://master.php.net/note/delete/97195/integrated Del: useless -- https://master.php.net/note/delete/97195/useless Del: bad code -- https://master.php.net/note/delete/97195/bad+code Del: spam -- https://master.php.net/note/delete/97195/spam Del: non-english -- https://master.php.net/note/delete/97195/non-english Del: in docs -- https://master.php.net/note/delete/97195/in+docs Del: other reasons-- https://master.php.net/note/delete/97195 Reject -- https://master.php.net/note/reject/97195 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167997) next »