views:

10

answers:

1
+1  Q: 

Zend Date Weekday.

Hello. In Zend Framework I want to find a number of week day.

echo Zend_Date::WEEKDAY_DIGIT;

But this returns e. Today is Wednesday. And I want to return 3 (or 2 if Monday is 0). How can I do it? I know how do it with DateTime class. But I need Zend_Date.

Thank you very much.

+2  A: 

Heyho,

small mistake there WEEKDAY_DIGIT is a constant that defines wich date placeholder is used for Weekday Digit (e). Try:

 $date = Zend_Date::now();
 print $date->get(Zend_Date::WEEKDAY_DIGIT);
Hannes
of course `print $date->get('e');` also works
Hannes
Thanks. Very good.
Alexander.Plutov