Jump to content

Help with PHP dates


coupe-r

Recommended Posts

Hey guys,

 

What I'm trying to do is set 2 dates.  Today's date and then a date 14 days from now.  However, I want it to increase the month if by adding 14 days will bring me to the next month, same with the year.

 

I have this, but it doesn't increment the month or year.

 

$week = mktime(11, 59, 59, date("m"), date("d")+14, date("y"));
$date =  date("Y-m-d H:i:s", $week);

Link to comment
https://forums.phpfreaks.com/topic/215658-help-with-php-dates/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.