I'd like to use Zend_Date to print out the previous 2 months and year as a string e.g.:
July 2009 June 2009
I need it to be locale aware so that if the code runs with the locale set to, say, German, the month names will print in German.
$date = new Zend_Date();
$date->subMonth(1);
echo $date->get(Zend_date::MONTH_NAME).' '.$date->get(Zend_Date::YEAR);
$date->subMonth(1);
echo $date->get(Zend_date::MONTH_NAME).' '.$date->get(Zend_Date::YEAR);
Is this all I need to do?
thanks