Am 23.06.2007 um 19:30 schrieb Alexander Limi:

Wonderful, then my template code depends on some variable defined in the code as the floor date as a private variable, meaning I shouldn't introspect it. Very robust. ;)

It was just an example. As I am not sure what you want do it was supposed to be illustrative. It's easy enough to move the code into a content-type for your special case with a "has_effective" method which will give you your boolean.

ModificationDate() and EffectiveDate() should both return strings for presentation; there's another method that returns the string "unknown" if there is no value
modified() and effective() should both return dates for comparison

If additional information is required then derived types should implement the necessary additional methods. As Tres says, it might make sense to make __FLOOR_DATE, etc. less of an unknown quantity and it might make sense to make them portal or content type properties that can be set.

However, before any changes are made it would be nice to have a more detailed explanation as to why you need these things.

Charlie Clark
Helmholtzstr. 20
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to