[Zope-dev] Equating dates

Jason Spisak webmaster@mtear.com
Tue, 11 May 1999 10:05:35 -0400


Zopists:

I am looking to equate two DateTime objects of different percision for
the day in a DTML expression like so:

<!--#if "date==appointment_date"-->
<!--#var foo-->
<!--#/if-->

Where date is today and appointment date is whenever.  However because
one or more of the dates has percision to the hour, and the other just
to the day, does anyone know how to equate them just on the day level. 
In other words:

<!--#if "date fmt=dayOfYear==appointment_date fmt=dayOfYear"-->;)

OR

<!--#if "_.dayOfYear(call_date)==_.dayOfYear(date)"-->

After reading the DateTime module I can't tell how to equate just the
day portion of a DateTime object.  Any hints?

-- 
Jason Spisak
webmaster@mtear.com