[Zope] Adding days in Zope using ZopeTime

Jason Spisak 444@hiretechs.com
Wed, 26 Apr 2000 22:22:07 GMT


Eron:

> Is there a handy way 

Well, a few weeks ago, I was looking fora built-in but didn't find one

>(besides fancy ZopeTime manipulation)
> to list the
> dates of the current week (6 days) in DTML?
> It would look like this
> 
> o Mon. [4/24]
> o Tue. [4/25]
> o Wed. [4/26]
> o ...etc...
> 
> would I use variables to represent the current date? If so then how
> would I make Zope add 1 or subtract 1 based on the current date?
> So if today is the 26th, tomorrow is the 27, but yesterday was the 25,
> how could I configure it to recognize that, while keeping it variable
> based? It's for a list that will display a weekly event calendar, maybe
> even with the current date in bold.

What about using the current week of the year as defined by:

Week of the year is: 

<dtml-var expr="((ZopeTime().dayOfYear())/7) + 1">

Just an idea,


Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.