I want to start using Zend_Date for it's extra functionality compared to
DateTime.

But with DateTime I'm able to do:

$end = new DateTime('last Sunday');
$start = clone $end;
$start->modify('last Monday');
$end->setTime(23, 59, 59);

This gives me beginning and end of last week. I don't see strtotime()
functionality in Zend_Date, did I miss something?

Do I have to do?:
$start = new Zend_Date();
$start->subWeek(1);
$start->setWeekday(1);
$start->setTime('00:00:00');
$end = clone $start;
$end->setWeekday(7);
$end->setTime('23:59:59');

Cheers
Karol
-- 
View this message in context: 
http://www.nabble.com/Zend_Date-vs.-DateTime-tf3815303s16154.html#a10800411
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to