[Zope] Adding days in Zope using ZopeTime
Curtis Maloney
curtis@umd.com.au
Sun, 30 Apr 2000 22:29:10 +1000
On Fri, 28 Apr 2000, Jason Spisak wrote:
> > I followed the discussion a little bit, and I think the solutions are
> > crazy.
>
> Me too. But the question asked for a DTML solution without modifying
> DateTime.
>
I, too, have been looking at this thread. I may be a little late in this,
there being still another 130 messages for me to read, but I am stunned nobody
has yet found this simple solution.
The original question, as i understood it, was to find the days of the current
week using DTML. Essentially, this requires finding the start of the week.
Some time ago, i required calculating "last tuesday", and resorted to using the
day of week operator of the DateTime object.
<dtml-var "_.DateTime().dow()">
if i recall correctly, this is a Sunday=0 based week. So, simply subtract that
many days from the current date, and you have the start of the week.
--
Have a better one,
Curtis.
<dtml-var standard_work_disclaimer>