note 61463 added to function.strptime

From: Date: Sat, 04 Feb 2006 10:55:20 +0000
Subject: note 61463 added to function.strptime
Groups: php.notes 
Request: Send a blank email to php-notes+get-102977@lists.php.net to get a copy of this message
Note that elements that are not found (since they don't exist in the specified format) will NOT be set to null. Also a two-digit-year (found with %y) is returned as 1969-2068 (or 69-168 since this function returns years since 1900). <?php $format = '%y-%m-%d'; $testdate = '69-04-03'; $founddate = strptime ($testdate, $format); var_dump ($founddate); ?> returns array(9) { ["tm_sec"]=> int(-1212975008) ["tm_min"]=> int(28) ["tm_hour"]=> int(140) ["tm_mday"]=> int(3) ["tm_mon"]=> int(3) ["tm_year"]=> int(69) ["tm_wday"]=> int(4) ["tm_yday"]=> int(92) ["unparsed"]=> string(0) "" } ---- Server IP: 64.246.30.37 Probable Submitter: 81.229.106.56 ---- Manual Page -- http://www.php.net/manual/en/function.strptime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61463 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61463&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61463&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61463&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61463&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61463&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61463&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61463&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61463&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102977) next »