[Zope] Date calculations in Zope

Greg McCall greg.mccall@telstra.com
Sun, 15 Dec 2002 14:47:31 +1100


Thanks but like the API reference, which I did check, and your =
information
gives little help in how to solve the problem.

The reference doc is far too cryptic. It should show examples which can =
be
directly tried in Zope.=20
A quick check of the web version of the book (something I would not =
normally
use) I find the following note added: (and it seems its author is also =
not
impressed with the doc)=20
<dtml-var expr=3D"_.DateTime()">
The comments also supply the following URL
http://www.zopelabs.com/cookbook/990690237
And this seems like an important example of how to display time stuff =
(no
calculations though) using DateTime()

Another date example using ZopeTime() is at
http://www.zope.org/Members/jooi/HowToDateCalculation

I don't know why ZopeTime() exists as well as DateTime() or which =
routine is
best.
I do know Zope is often does things in obscure ways with little help and
that comments like yours suggest the doc is fine and it must just be the
user who will not read the info (all of it and keep all the bits in your
head just to do a few simple jobs)=20

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of =
Dennis
Allison
Sent: Sunday, December 15, 2002 10:24 AM
To: Greg McCall
Cc: zope@zope.org
Subject: Re: [Zope] Date calculations in Zope




On Sun, 15 Dec 2002, Greg McCall wrote:

> Hi
> I am having trouble performing date calculations in Zope.
> I have a variable called dob which returns a date of birth from MySQL=20
> Ie. Date of Birth=3D<dtml-var dob> works fine I would like to be able =
to=20
> list the current age in years and months
>=20

Read the DateTime() API carefully and use it.



_______________________________________________
Zope maillist  -  Zope@zope.org =
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -=20
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )