[Zope-CMF] Re: Effective Date inconsistencies

Alexander Limi limi at plone.org
Sun Jun 24 14:41:44 EDT 2007

On Sun, 24 Jun 2007 06:33:28 -0700, Tres Seaver  
<tseaver at palladion.com> wrote:

> - -1:  anybody who is using the string representations for comparison is
> mising the point:  those values are "display only."  they should be
> using the forms which return real datetime obojects.

Yeah, I wasn't arguing for changing the DC element accessors, I know those  
should be strings.

> The ceiling / floor date bits are there to support indexing / sorting,
> and therefore comparison.
> We could tackle this by adding an argument, 'use_ceiling' / 'use_floor'
> to those methods, defaulting it to True for this release, and then
> switch the default and add a deprecation warning in the next release.
> Or we could add new APIs, e.g. 'effectiveOrNone', 'expiresOrNone' and
> leave the current methods alone.
> If you want to talk about remonving those  bits, you still have to deal
> with special casing the bits where the content object has a real None
> value.  For indexing, we can use the support provided already by
> DateRangeIndex for handling "open" intervals (the real case that the
> floor / ceiling were meant to handle).

OK, I just wanted to compare two dates like I do in Python, and display a  
result accordingly. So would the "correct" thing to do here make it  
support None as a return value, but switch to DateRangeIndex?

Alexander Limi · http://limi.net

More information about the Zope-CMF mailing list