Advancing Calendar Date


#1

I want to show today’s date and then based off today’s date show days in advance on a very simple webpage created in Joomla.

ie - Today’s date is 2012-04-03

3days: 2012-04-06
7days: 2012-04-10
30days: 2012-05-03
90days: 2012-07-02

I can’t figure out how to add days?!?!?!

Any and all help would be greatly appreciated


#2

and what code do you have thus far?


#3

I don’t really, in excel its Today() and then in the cell you want to display it is A1+30,A1+60, A1+90 but it doesn’t work in html!


#4

Days Calculator for the Date:

3 day 7 day 30 day 90 day

#5

date - Format a local time/date
[b]strftime[b] - Format a local time/date
[b]strftime[b] - Format a local time/date according to locale settings
strtotime - Parse about any English textual datetime description into a Unix timestamp

the best examples from a date, would come from strftime


#6

[php]
$date = date(“Y-m-d”);// current date

$date = strtotime(date(“Y-m-d”, strtotime($date)) . " +1 day");
$date = strtotime(date(“Y-m-d”, strtotime($date)) . " +1 week");
$date = strtotime(date(“Y-m-d”, strtotime($date)) . " +2 week");
$date = strtotime(date(“Y-m-d”, strtotime($date)) . " +1 month");
$date = strtotime(date(“Y-m-d”, strtotime($date)) . " +30 days");
[/php]


#7

kinda pointless to post the example when the solution was already given.
LOL


#8

LOL, YEP, Laffin… I had the screen open for hours while I was doing other stuff… And, didn’t press send.
Finally did, a bit tooo late… Well, an extra example never hurts! LOL…