I think his question is: "How do I determine (automagically) what the first day of the week is, for a given LOCALE?"
I think he wants something like this: Zend_Locale::setLocale( <LOCALE> ); Zend_Date::getFirstWeekday(); // returns 0 for Americas, 1 for Germany On Mon, Dec 7, 2009 at 11:07 AM, Thomas Weidner <thomas.weid...@gmx.at> wrote: > > ----- 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 > -- A.J. Brown web | http://ajbrown.org phone | (937) 660-3969