future date finding

Got a quick question. Without going into to much detail, i need to take a future date and subtract 3 months from it. the date is already a unix timestamp. When its 3 months from whatever today’s date is, i need to have it do something.

The page was done, but its looking only looking at the close date and today’s date, i need to change it to look at the 3 month date and today

This the comparison
[php]$today = date(“d-m-Y”);
if($id[‘close_date’] < strtotime($today)) {[/php]

Any help would be appreciated.

[php]$today = date(“d-m-Y”);
if ($id[‘close_date’] < strtotime(’+3 months’)) {

[/php]
maybe

That’ll take today’s date and add 3 months to it. I need to look at 3 months before the close date.

strtotime(’-3 month’) takes today’s date and subtracts 3 months from it. I found a way to do it using the same concept.
[php]
$close_date = strtotime(’-3 month’, $id[‘close_date’]);
if(strtotime($today) == $close_date || $id[‘close_date’] < strtotime($today)) { [/php]

i needed a way to run part of a script when today’s date hit the 3 month prior date (which is what $close_date is)

ok cool

Sponsor our Newsletter | Privacy Policy | Terms of Service