Scott Burton wrote:
> This is the correct list :)
> ----------
> From: Scott Burton <[EMAIL PROTECTED]>
> Date: Tue, 19 Sep 2000 14:27:46 -0700
> Subject: [Zope-PTK] Date Question
> 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.

You shouldn't have to.
If Zope's DateTime has the today method, you culd do:
<dtml-in "Catalog(meta_type='object_type')">
  <dtml-if " < bobobase_modification_time">
    &dtml-title; was modified today.

hmmm ... lemme see if it does ... nope.
Well, it works in python.
The other day (at a machine I don't have access too right now) I managed
to get mxDateTime in the namespace. If it would help, I'll try to post
what I did to get it done.

In the meantime, if you have mxDateTime installed, you should be able to
have an external method called "Today", that returns, and
compare as thus:

<dtml-in "Catalog(meta_type='object_type')">
  <dtml-if "Today < bobobase_modification_time">
    &dtml-title; was modified today.

still-wishing-mxDateTime-was-available-in-Zope-ly y'rs Bill

Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to