note 85969 added to function.strtotime
| From: | w_haigh at yahoo dot com | Date: | Fri, 26 Sep 2008 13:25:53 +0000 |
| Subject: | note 85969 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-144744@lists.php.net to get a copy of this message | ||
Historically, the "English" text to date parsers in PHP only accept the illogical American
format of "mm/dd/yyyy". In this case, don't use strtotime, construct the date
manually e.g :
<?php
$r = "29/9/2008";
$date = explode("/",$r);
echo date("D d M",mktime(0,0,0,$date[1],$date[0],$date[2]))."\n";
?>
----
Server IP: 92.48.74.199
Probable Submitter: 193.108.73.47
----
Manual Page -- http://www.php.net/manual/en/function.strtotime.php
Edit -- https://master.php.net/note/edit/85969
Del: integrated -- https://master.php.net/note/delete/85969/integrated
Del: useless -- https://master.php.net/note/delete/85969/useless
Del: bad code -- https://master.php.net/note/delete/85969/bad+code
Del: spam -- https://master.php.net/note/delete/85969/spam
Del: non-english -- https://master.php.net/note/delete/85969/non-english
Del: in docs -- https://master.php.net/note/delete/85969/in+docs
Del: other reasons-- https://master.php.net/note/delete/85969
Reject -- https://master.php.net/note/reject/85969
Search -- https://master.php.net/manage/user-notes.php