Hey! :)
I have a question, how to generate a range of dates using Zend_Date? I mean, if
I have this range of dates from the database: 2008-08-12 00:00:00 | 2008-09-26
00:00:00 and I want to get all dates between those dates, like:
2008-08-12
2008-08-13
2008-08-14
2008-08-15
2008-08-XX
...
Hello,
so far I can remember Zend_Date has a method addDay().
And the solution would look like:
$dateFrom = new Zend_Date('2008-08-12 00:00:00');
$dateTo = new Zend_Date('2008-09-26 00:00:00');
while ($dateFrom-compareDate($dateTo)) {
echo $dateFrom-toString();
$dateFrom-addDay(1);
Hey!, thx I use the Zend_Date::addHour method, but is your wolution works fine
too, here's my code:
$objDateStartMin = new Zend_Date( 2008-08-12 00:00:00, null,
Zend_Registry::get( objLocale ) );
// Get date_end_max Zend_Date object.
$objDateEndMax = new Zend_Date( 2008-09-26 00:00:00, null,