[PHP] Re: counting with dates (help!)

2002-01-21 Thread Ken Gregg
Another macro language I used had a newdate function. Pass it a data and an offset in number of days and it would return the new date. I duplicated it in php here: function newdate( $strdate, $ndays) { # strtotime doesn't like dashes $strdate = str_replace("-","/",$strdate); $temp = strtotime

[PHP] Re: counting with dates (help!)

2002-01-07 Thread George Nicolae
$today=mktime(0,0,0,date("m"),date("d"),date("Y")); $last_week=mktime(0,0,0,date("m",mktime(0,0,0,date("m"),date("d")-7,date("Y" ))),date("d",mktime(0,0,0,date("m"),date("d")-7,date("Y"))),date("Y",mktime( 0,0,0,date("m"),date("d")-7,date("Y"; echo date("d",$today)-date("d",$last_week); --