note 64276 added to function.strtotime

From: Date: Tue, 11 Apr 2006 11:08:56 +0000
Subject: note 64276 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-107750@lists.php.net to get a copy of this message
I have had some inconsistancies that was not immediately evident and suggested that strtotime treated my date formats in different ways. I had trouble with the date format: d/m/Y I eliminated the inconsistancies by changing the date format to one where (i guess) php does not try and guess the right format. In my case I changed it to the format (d-M-Y) in which case it worked. Example when trying to find a person's age where: //$date in format (d/m/Y) was inconsistant but fixed when in format (d-M-Y), e.g. (01-January-2001) $age = (time() - strtotime($date))/(60*60*24*360); ---- Server IP: 85.116.0.130 Probable Submitter: 217.37.49.49 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- http://master.php.net/note/edit/64276 Del: integrated -- http://master.php.net/note/delete/64276/integrated Del: useless -- http://master.php.net/note/delete/64276/useless Del: bad code -- http://master.php.net/note/delete/64276/bad+code Del: spam -- http://master.php.net/note/delete/64276/spam Del: non-english -- http://master.php.net/note/delete/64276/non-english Del: in docs -- http://master.php.net/note/delete/64276/in+docs Del: other reasons-- http://master.php.net/note/delete/64276 Reject -- http://master.php.net/note/reject/64276 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107750) next »