From f0f1a3280d750b1d9bc636acf2b04465595813c5 Mon Sep 17 00:00:00 2001 From: jim winstead Date: Fri, 14 Dec 2001 20:59:38 +0000 Subject: [PATCH] strtotime: add last/next examples, document now parameter, add note about timestamp range git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@65063 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/datetime.xml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/functions/datetime.xml b/functions/datetime.xml index 7d095c265c..2de0f25683 100644 --- a/functions/datetime.xml +++ b/functions/datetime.xml @@ -1,5 +1,5 @@ - + Date and Time functions Date/time @@ -1112,12 +1112,13 @@ print (strftime ("%A.\n")); - The function expects to be given a string containing an English - date format and will try to parse that format into a UNIX - timestamp. Upon failure, -1 is returned. + The function expects to be given a string containing an English date + format and will try to parse that format into a UNIX timestamp relative + to the timestamp given in now, or the current time + if none is supplied. Upon failure, -1 is returned. - Since strtotime behaves according to GNU + Because strtotime behaves according to GNU date syntax, have a look at the GNU manual page titled Date Input Formats. Described there is valid syntax for the time @@ -1128,11 +1129,13 @@ print (strftime ("%A.\n")); <function>strtotime</function> examples @@ -1152,6 +1155,14 @@ if (($timestamp = strtotime($str)) === -1) { + + + The valid range of a timestamp is typically from Fri, 13 Dec + 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are + the dates that correspond to the minimum and maximum values for + a 32-bit signed integer.) + +