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);
>
Hi,
I don't know if it is an elegant option but what you could do
is $zfDate->setWeekday($weekday+1);
On Sun, Aug 22, 2010 at 1:31 AM, debussy007 wrote:
>
> Hi,
>
> I have stored a schedule in database, which contains weekdays and time
> slots.
>
> I want to create a date and set the weekday :
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);
The problem is when the weekday is 0, I got an exception, it only accepts
weekdays from 1 to 7. How do I spe