note 28538 added to function.strtotime
| From: | chirchik at r66 dot ru | Date: | Thu, 16 Jan 2003 12:20:29 +0000 |
| Subject: | note 28538 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42212@lists.php.net to get a copy of this message | ||
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;
}
--
http://www.php.net/manual/en/function.strtotime.php
http://master.php.net/manage/user-notes.php?action=edit+28538
http://master.php.net/manage/user-notes.php?action=delete+28538
http://master.php.net/manage/user-notes.php?action=reject+28538