[ic] Date time stamp
Anthony Minero
anthony at urbanscooters.com
Mon Jan 5 14:30:25 EST 2004
> On Mon, 05 Jan 2004 10:26:30 -0800
> Anthony Minero <anthony at urbanscooters.com> wrote:
>> I guess what I need is an
>> if/else statement that says;
>> If day=Monday
>> Add 6 days to the date
>> Else if day=Tuesday add 5 days to the date
>> Else if day=Wednesday add 4 days to the date
>> Etc.
>>
>> Does anyone know how to do this?
>
> On 1/5/04 11:07 AM, "Stefan Hornburg" <racke at linuxia.de> wrote:
> [calc]
> $time = $Tag->time('', {}, '%s');
> $days = 7 - $Tag->time(undef, {time=>$time}, '%w');
> $Tag->time(undef, {time => $time + $days * 86400}, '%A, %B %d, %Y');
> [/calc]
>
> Ciao
> Racke
>
Great, that works. I'm not sure how it's working exactly but it shows
Sundays date and I'm assuming it just detects today's date and changes the
$time tag accordingly?
Thanks
--
Anthony Minero
http://urbanscooters.com
--
More information about the interchange-users
mailing list