> If anyone is interested, this is what I finally came up with. I'm not sure
> how graceful it is, but it works ;) 

Here's another method... which can be condensed, but I left it expanded to
demonstrate what was going on.  The trick is finding the first day of the
*next* month, and getting the previous day  (
mktime(0,0,0,$start_month+3,0,$year) ), which is always the last day of the
previous month.


$quarter = ceil(date('n')/3);
$last_quarter = ($quarter==1?4:$quarter-1);
$year =($last_quarter==4?date("Y")-1:date("Y"));
$start_month = (($last_quarter-1)*3)+1;
$end_day = date("d",mktime(0,0,0,$start_month+3,0,$year));
echo "Start Date:".date("Y-m-d",mktime(0,0,0,$start_month,1,$year))."\n";
echo "End

Do You Yahoo!?
Yahoo! Sports - live college hoops coverage

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to