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);
}

or somthing like that ;-)


--
Pagarbiai,
Vladas Diržys
Tel.: +370 620 69020
www.dirzys.com


On Thu, Aug 21, 2008 at 10:54 PM, Juan Felipe Alvarez Saldarriaga <
[EMAIL PROTECTED]> wrote:

> 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
> ...
> 2008-09-01
> 2008-09-02
> 2008-09-03
> 2008-09-XX
> ...
> 2008-09-26 00:00:00
>
> Thx for any help.
>

Reply via email to