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.
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests