note 61463 deleted from function.strptime by betz
| From: | betz@php.net | Date: | Mon, 21 Aug 2006 10:47:39 +0000 |
| Subject: | note 61463 deleted from function.strptime by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-116116@lists.php.net to get a copy of this message | ||
Note Submitter: erik at ackerholm dot se
----
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) ""
}