[Zope] Need help with date comparisons
Jason Spisak
444@hiretechs.com
Mon, 16 Oct 2000 06:34:21 GMT
Jonathan:
You can try:
<dtml-in "['January', 'February', 'March', 'April',
'May', 'June', 'July', 'August', 'September',
'October', 'November', 'December']">
<dtml-if "event_date.Month() == _['sequence-item']">
<dtml-var event_date>
</dtml-if>
</dtml-in>
The source for DateTime() is pretty easy to follow. You can look for you
format's there.
All my best,
> Hi all again.
>
> I have a blank in my mind where I hoped the answer might be to this
> probably straightforward exercise.
>
> I have a zclass containing a date property called event_date.
>
> I want a page that loops through the months of the year, starting with
> the current month, and in each loop displays all the instances from the
> catalog with an event_date within the month in question.
>
> I just get stuck, completely stuck, trying to get the month value from
> the event_date and to compare it with the current month value.
>
> Anyone done this or something like this? Is this hard or am I a bit, you
> know, dense?
>
> thanks
>
> Jonathan
>
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.