note 56959 added to function.date

From: Date: Tue, 20 Sep 2005 11:59:13 +0000
Subject: note 56959 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-95469@lists.php.net to get a copy of this message
How do you add 14 days on to a date I have been trying lots of possiblitys but with no luck. Yes it could be as easy as: <?php $date = date("d M Y"); $date_final = $date + 14; echo $date_final; ?> But that will only add the days and scrub out the month and year. I would like it in that format but if numbers is easier then so be it. Problem comes when the date is 24 September 2005 and the bill is due in 14 days on the 4 October 2005. The date seems to only reply with "38" which we all know is an invalid day! So how could the date be added including the months and year if near december?! Any ideas Liam ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56959 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56959&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56959&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56959&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56959&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56959&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+56959&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56959&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56959&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95469) next »