----- Original Message -----
From: "takeshin" <admi...@gmail.com>
To: <fw-general@lists.zend.com>
Sent: Monday, December 07, 2009 3:25 PM
Subject: Re: [fw-general] Zend_Date first day of the week
$date->getWeekday(0);
Note that NOT EVERY COUNTRY defines 0 to be sunday... it depends on the
country if 0 is a sunday or another day.
Thank you. That's all in the manual.
Why have you asked when you knew it and all is within the manual ??
But, simply put:
How to determine this is '0' should be 0 or other value for specified
locale?
Don't rely on "0"...
As said 0 can be sunday or saturday or monday.
But monday is always monday.
I thought that Zend_Date might provide this information.
It does.
I'm creating a calendar. It would be nice, if calendar looked like this:
// for english speaking users
Zend_Locale::setLocale('en');
(0)Sunday, (1)Monday, (2)Tuesday, (3)Wednesday …
// for German speaking users
Zend_Locale::setLocale('de');
(1)Montag, (2)Dienstag, (3)Mittwoch, (4)Donnerstag…
//
Zend_Locale::setLocale('pl');
(1)Poniedziałek, (2)Wtorek, (3)Środa, (4)Czwartek…
As said before:
Don't rely on 0 being Sunday.
The 7.December.2009 is always monday regardless of the locale or if the used
calendar format defines 0 to be sunday.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com