[Zope] Adding days in Zope using ZopeTime

Jason Spisak 444@hiretechs.com
Wed, 26 Apr 2000 23:45:19 GMT


Eron:

> > Is there a handy way
 
I don't know about handy but here it is:


<dtml-in "_.range(0,8)" reverse>
<dtml-if "_.round((_.DateTime.dayOfYear(ZopeTime() -
_['sequence-item'])/6.88)+1) ==
_.round(((ZopeTime().dayOfYear())/6.88)+1)">
<dtml-var expr="ZopeTime() - _['sequence-item']" fmt=Date>
</dtml-if>
</dtml-in>
<dtml-in "_.range(1,8)">
<dtml-if "_.round((_.DateTime.dayOfYear(ZopeTime() +
_['sequence-item'])/6.88)+1) ==
_.round(((ZopeTime().dayOfYear())/6.88)+1)">
<dtml-var expr="ZopeTime() + _['sequence-item']" fmt=Date>
</dtml-if>
</dtml-in>

Someone interupted me while I was figuring this out, and I can't for the
life of me remember where I got 6.88 from.  I'll mull it over.


All my best,


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.