From 62af7d467fda3232b1c30348ac57cb1c90c31e20 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 21 Nov 2001 23:21:30 +0000 Subject: [PATCH] strtotime() returns -1 upon failure, added another example too. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@62978 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/datetime.xml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/functions/datetime.xml b/functions/datetime.xml index f0ebf020b4..994a1165a2 100644 --- a/functions/datetime.xml +++ b/functions/datetime.xml @@ -1,5 +1,5 @@ - + Date and Time functions Date/time @@ -1111,7 +1111,7 @@ 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. + timestamp. Upon failure, -1 is returned. <function>strtotime</function> examples @@ -1121,6 +1121,21 @@ echo strtotime ("10 September 2000") . "\n"; echo strtotime ("+1 day") . "\n"; echo strtotime ("+1 week") . "\n"; echo strtotime ("+1 week 2 days 4 hours 2 seconds") . "\n"; +]]> + + + + + + Checking for failure + +