[ic] Date time stamp
aaronmail at hazenet.net
Mon Jan 5 14:00:08 EST 2004
On Mon, 05 Jan 2004 10:26:30 -0800, Anthony Minero
<anthony at urbanscooters.com> wrote:
> On 12/30/03 6:12 PM, "Mike Heins" <mike at perusion.com> wrote:
>> Quoting Anthony Minero (anthony at urbanscooters.com):
>>> I read the developers resource notes on how to add the date to a page
>>> and it
>>> is pretty straight forward, I'm just using;
>>> [time]%A, %B %d, %Y[/time]
>>> But I'd like to be able to show the date of the next Sunday of every
>>> We have sales that end every Sunday and instead of having to manually
>>> the date every week I'm trying to figure out how to just display the
>>> recent Sundays date, if that makes sense.
>> You should check the documentation for the time tag:
> Yeah I did that and I see how to adjust it so it always 3 hours ahead of
> real time etc. but that's not really what I need. I guess what I need is
> 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
> Does anyone know how to do this?
i suppose you could do something like:
[if type="scratch" term="day" op="==" compare="1"]
day is monday, set date: [time adjust="+6 days"]%c[/time]
[elsif ... etc]
i just went through this creating some detailed date calculations. at
a certain point, you may need something like the Date::Calc module.
However, this also means that you will need to "use" that module and
thus put your code into a UserTag.
More information about the interchange-users