[Zope] How to subtract one date from another?

mindlace mindlace@imeme.net
Wed, 26 Apr 2000 11:11:09 -0600


jens ebaer wrote:
> 
> Hi all,
> 
> I have to to this: date - date = 20 days. (2000-5-5 - 2000-5-2 = 3 days)
> 
> I checked Zope Quick Reference but couldnīt find a function which provide
> this.

If you want to do today - somedateproperty, then do
<dtml-if "_.int(ZopeTime() - somedateproperty) = 20">

otherwise, you can do <dtml-if "_.int(somedateproperty -
someotherdateproperty) = 20">

HTH,
-- 
ethan mindlace fremen        mindlace@imeme.net
zope    -&-     imap email   -&-   mailing list
weave your web with the web at http://imeme.net