----- Original Message -----
From: Andy Gates <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 4:06 PM
Subject: [Zope] Newbie: Date checking?

> A quicky for you Zopistas:  I have some dates in a database, which
> govern when a story becomes live and when it expires.  I need to do a
> test along the lines of:
> dtml-in stories
>   if (startdate is past) and (expirydate is future)
>     show the story
>   /if
> /in
> I have seen the fmt parameters isPast and isFuture and this gives me a
> true/false response:  <dtml-var startdate fmt=isPast>  but how do I use
> that in an if test?
>>>>>>>>>> I keep (as usual) getting syntax errors.

<dtml-if "_.DateTime(startdate).isPast() and _.DateTime(expirydate).isFuture()">


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to