Am 22.08.2010 01:31, schrieb debussy007:
>
> Hi,
>
> I have stored a schedule in database, which contains weekdays and time
> slots.
>
> I want to create a date and set the weekday :
>
> $zfDate = new Zend_Date();
> $zfDate->setWeekday($weekday);
Just do:
$zfDate->setWeekday($weekday % 7);
> The problem is when the weekday is 0, I got an exception, it only accepts
> weekdays from 1 to 7. How do I specify to use weekdays from 0 to 6 as they
> are stored in my DB ? (I don't want 7 to be Sunday but rather 0).
>
> I tried the following :
>
> $zfDate = new Zend_Date(NULL, NULL, new Zend_Locale('en_US'));
>
> But it didn't work.
>
> Thank you for any help !
--
Ben Scholzen 'DASPRiD'
Community Review Team Member | [email protected]
Zend Framework | http://www.dasprids.de
PGP key: http://stuff.dasprids.de/pgp/ben-scholzen-pgp-key.asc