[Zope-PTK] Date Question

Toshio Matsuda matsuda-toshio@fujielectric.co.jp
Wed, 20 Sep 2000 17:53:25 +0900 (LMT)


Hi,

>>>>> Date: Tue, 19 Sep 2000 14:27:46 -0700
>>>>> Subject: [Zope-PTK] Date Question
>>>>> MsgId: <B5ED2861.17B9%scott@launchpoint.net>
>>>>> scott@launchpoint.net(Scott Burton) said:
> 
> OK, I have searched everywhere for the answer to this. It is quite simple
> but I can't seem to figure it out. All I want to do is iterate over
> cataloged objects(<dtml-in "Catalog(meta_type='object_type')">) and only
> show items who's bobobase_modification_date matches today's date.
> I just can't figure out how to set the fmt="%d" in an if tag.

The following page is good for you.

http://www.zope.org/Members/Zen/howto/AdvZCatalogSearching

I usually compare the date against today as follows:

<dtml-if "bobobase_modification_time.Date() == ZopeTime().Date()">

-- 
Toshio Matsuda <matsuda-toshio@fujielectric.co.jp>