note 28538 deleted from function.strtotime by sniper

From: Date: Tue, 21 Oct 2003 11:02:46 +0000
Subject: note 28538 deleted from function.strtotime by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59011@lists.php.net to get a copy of this message
Note Submitter: chirchik@r66.ru ---- Here's a simple workaround for date formats often used in Germany and Russia: d.m.[whatever]. It turns the string to m/d/[whatever], and then feeds it to strtotime. function strtotimeRus($date){ $date=explode(".",$date); $d=$date[1]."/".$date[0]."/"; unset($date[0]); unset($date[1]); $d=$d.implode(".",$date); $date=strtotime($d); return $date; }

« previous php.notes (#59011) next »