Which version of Zope are you using? I tested my examples in Zope 2.3.0. This is the first version that uses the mx.DateTime module, which is more accurate than the original DateTime module from the Python 1.5.2 dist. Best regards, Luciano Alejandro Pancani wrote:
I don't know why, but if you use that dates, the results seems to be wrong
<dtml-var expr="_.DateTime('2001-04-01')-_.DateTime('2001-01-30')">
Do you know why?
----- Original Message ----- From: "Luciano Ramalho" <luciano@hiper.com.br> To: "Alejandro Pancani" <apancani@topgroup.com.ar> Cc: <zope@zope.org> Sent: Monday, February 12, 2001 2:32 PM Subject: Re: [Zope] Dates
Example 1:
Number of days between two dates: <dtml-var expr="_.DateTime('2001-02-01')-_.DateTime('2001-01-30')">
Example 2:
Looping from certain starting date to 9 days after that: <dtml-in "_.range(10)"> <dtml-var expr="_.DateTime('2001-02-01')+_['sequence-item']"><br> </dtml-in>
Alejandro Pancani wrote:
I'm wondering if anybody know how to calculate the days betwen two
dates or
any way to loop betwen two dates
_______________________________________________ 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 )
_______________________________________________ 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 )
participants (1)
-
Luciano Ramalho