note 103163 modified in function.date by danbrown

From: Date: Tue, 29 Mar 2011 18:47:12 +0000
Subject: note 103163 modified in function.date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-178313@lists.php.net to get a copy of this message
If you are simply trying to generate a date set in the future (for example, to setup a conditional to check if a value was created a month ago). You can use this. <?php print date('m-d-Y',strtotime('+1 month', '1301413787')); // generates 04-29-2011 ?> This syntax was not noted in an easy to read place within the strtotime() or date() function pages, so just adding as note. --was-- If you are simply trying to generate a date set in the future (for example, to setup a conditional to check if a value was created a month ago). You can use this. print date('m-d-Y',strtotime('+1 month', '1301413787')); // generates 04-29-2011 This syntax was not noted in an easy to read place within the strtotime() or date() function pages, so just adding as note. http://php.net/manual/en/function.date.php

« previous php.notes (#178313) next »