Alex Pliutau
Alex Pliutau

Reputation: 21957

Zend Date Weekday

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.

Upvotes: 3

Views: 3071

Answers (1)

Hannes
Hannes

Reputation: 8237

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

Upvotes: 5

Related Questions