[Zope-CMF] Re: Effective Date inconsistencies

Charlie Clark charlie at begeistert.org
Sat Jun 23 07:34:37 EDT 2007


Am 23.06.2007 um 12:07 schrieb Alexander Limi:

> I'd like this one to return False, not some floor value. I  
> understand that the official CamelCase accessors always return  
> strings (which is fine), but I don't see why "effective()" can't  
> give a False value. Is this just historical, or is there a real  
> reason for it?

I suspect it is historical but I don't think it should return a  
boolean because that would have even weirder side-effects. If it  
returns a __FLOOR_DATE then you can easily write your own comparison  
to create a boolean.

<p tal:condition="python: context.effective() > DateTime(1970, 0) and  
context.effective < context.modified()">has an effective date and was  
modified afterwards</p>

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





More information about the Zope-CMF mailing list