[ZCM] [ZC] 30/ 4 Reject "Empty Date times cause errors"

Collector: Zope Bugs, Features, and Patches ... zope-coders@zope.org
Thu, 11 Apr 2002 15:11:22 -0400


Issue #30 Update (Reject) "Empty Date times cause errors"
 Status Rejected, Zope/bug+solution medium
To followup, visit:
  http://collector.zope.org/Zope/30

==============================================================
= Reject - Entry #4 by Brian on Apr 11, 2002 3:11 pm

 Status: Accepted => Rejected

This one has been overtaken by events. The plan is 
to consider a datatype with a different name 
(like optional_date) that has a different behavior. 

Changing the behavior of the current impl. would 
break too many existing applications.

--Brian
________________________________________
= Comment - Entry #3 by regebro on Jan 26, 2002 11:19 am

Any possibility of this being a part of 2.5.0?
We are going to skip 2.4 and move our products to 2.5 as soon as it gets released. 
________________________________________
= Assign - Entry #2 by matt on Nov 30, 2001 2:33 pm

 Status: Pending => Accepted

 Supporters added: Brian

Brian what would you like to do with this?
________________________________________
= Request - Entry #1 by regebro on Nov 13, 2001 6:58 am


Uploaded:  "Converters_fixed_datetime.py"
 - http://collector.zope.org/Zope/30/Converters_fixed_datetime.py/view
If you have a form with a DateTime field and you don't want to specify a time, but rather want the date to be empty, the only way to do this is to write a rather unintuitive "None" in the form field.

I suggest that an empty string is accepted as a valid date, rather like a "null"-date. This is easily done by letting field2date return an empty string if it is fed an empty string instead of raising an error.

I have attached a Converter.py that implements this (based on the 1.12 Converter.py).
==============================================================