Hash: SHA1

Alexander Limi wrote:
> On Sat, 23 Jun 2007 08:15:02 -0700, Wichert Akkerman  
> <[EMAIL PROTECTED]> wrote:
>> Previously Laurence Rowe wrote:
>>> How about changing EffectiveDate to:
>>>         return ed and ed.toZone(zone).ISO() or ''
>>> from the existing (as pointed out by Charlie):
>>>         return ed and ed.toZone(zone).ISO() or 'None'
>>> It would seem the least risky fix. (I'm not sure it's strictly a bug but
>>> it struck me as completely brain dead when I was caught out by it).
>> We can't change it - people may rely on the current behaviour.
> Which I why I ask here, people that may rely on this are likely to be on  
> this list (and able to speak up about it).
> The fact that zope.dublincore got it right makes it even more interesting  
> to harmonize them, IMO.

- -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.

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).

- --
Tres Seaver          +1 540-429-0999          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to