[Zope] Re - Compare two dates in dtml
Alexandre Ratti
alex@gabuzomeu.net
Thu, 25 Nov 1999 22:41:56 +0100
Salut FR,
To get you started, try using "isCurrentDay()".
Simple test:
- Add the property myDate (type "date") to a folder and fill in a value
(eg. 1999/11/25).
- In a DTML method of this folder, enter the code:
<dtml-if "myDate.isCurrentDay()">
This is today
<dtml-else>
This is not today
</dtml-if>
Similar methods are documented in '/lib/python/DateTime/DateTime.html' in
your Zope directory.
Cheers.
Alexandre
At 12:00 25/11/1999 -0800, zope-admin@zope.org wrote:
>Date: Thu, 25 Nov 1999 20:48:14 +0100
>From: FR Chalaoux <chalaoux@cybercable.fr>
>To: zope@zope.org
>Subject: [Zope] Compare two dates in dtml
>
>Hi,
>
>Howto compare two dates in DTML.
>
>For example, howto to post an image *if* the current date (ZopeTime) is
>inferior to my
>
>date being in this format year/month/day *elsif* do not post the image ?
>
>Bye, FR.