cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: svn commit: r357004 - in /cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor: FormattingDateConvertor.java FormattingDateConvertorBuilder.java Icu4jDateConvertor.java Icu4jDateConvertorBuilder.java
Date Mon, 19 Dec 2005 12:43:58 GMT
Ugo Cei wrote:
>
> Il giorno 15/dic/05, alle ore 12:24, ugo@apache.org ha scritto:
>
>> Author: ugo
>> Date: Thu Dec 15 03:23:56 2005
>> New Revision: 357004
>>
>> URL: http://svn.apache.org/viewcvs?rev=357004&view=rev
>> Log:
>> [Forms] Added "lenient" attribute to date convertors.
>
> What this change does is adding a new "lenient" attribute to the 
> CForms date convertors (formatting AND icu4j). By default, "lenient" 
> is true and what this means is that a date like "12-32-2005" (Dec. 
> 32nd) is silently converted to "01-01-2006" due to the way Java's 
> DateFormat class works.
>
> But if you set lenient="false", a date like that will be rejected and 
> will not pass validation.

Do we really need yet another configuration option? I didn't knew about 
this date format's leniency, and IMO the date convertor shouldn't be 
lenient since "12-32-2005" is obviously an invalid input. So what about 
simply always set lenient to false?

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message