Zend date weekday

In the Zend Framework, I want to find a few week days.

echo Zend_Date::WEEKDAY_DIGIT;

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

Many thanks.

+3
source share
1 answer

Heyho,

A little mistake there. WEEKDAY_DIGIT is a constant that determines which date placeholder is used for the daily digit (e). Try:

 $date = Zend_Date::now();
 print $date->get(Zend_Date::WEEKDAY_DIGIT);
+5
source

Source: https://habr.com/ru/post/1769313/


All Articles