From 94f320d2db4814846690a50fe63a4caffad4c682 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 1 Jan 2007 10:34:56 +0000 Subject: [PATCH] typo in the example output. add also strtotime(+1 week) to the example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@226175 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/datetime/functions/time.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reference/datetime/functions/time.xml b/reference/datetime/functions/time.xml index 6a9b88747b..bd91b30585 100644 --- a/reference/datetime/functions/time.xml +++ b/reference/datetime/functions/time.xml @@ -1,5 +1,5 @@ - + time @@ -30,6 +30,8 @@ $nextWeek = time() + (7 * 24 * 60 * 60); // 7 days; 24 hours; 60 mins; 60secs echo 'Now: '. date('Y-m-d') ."\n"; echo 'Next Week: '. date('Y-m-d', $nextWeek) ."\n"; +// or using strtotime(): +echo 'Next Week: '. date('Y-m-d', strtotime('+1 week')) ."\n"; ?> ]]> @@ -37,7 +39,8 @@ echo 'Next Week: '. date('Y-m-d', $nextWeek) ."\n";