[Zope] DTML Method - delete files

Ausum Studio ausum_studio at hotmail.com
Sat May 15 02:18:49 EDT 2004


Look for the object DateTime in the help files of your Zope installation.
They have a nice set of methods to compare time dates.

Anyways, they all return false or true, so in your case I would convert the
time dates to integers, then perform a simple subtraction operation, and
check if the most recent date is greater to ...
seconds_in_a_day * 5.

Ausum


----- Original Message ----- 
From: "Laura McCord" <Laura.McCord at doucet-austin.com>
To: <zope at zope.org>
Sent: Friday, May 14, 2004 4:10 PM
Subject: [Zope] DTML Method - delete files


I am almost done writing the script but I need to figure out how to
compare two dates. For instance, I have this: <dtml-var ZopeTime
fmt="%m/%d/%Y">
                                  <dtml-var modification_date
fmt="%m/%d/%Y">

*** Now I need to compare the two dates to see if the ZopeTime is
greater by 5 days.

Any ideas on how to do that using dtml?

_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )



More information about the Zope mailing list