You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "sean schofield (JIRA)" <my...@incubator.apache.org> on 2005/08/30 00:41:06 UTC
[jira] Created: (MYFACES-459) DateTimeConverter should not allow lenient date formatting
DateTimeConverter should not allow lenient date formatting
----------------------------------------------------------
Key: MYFACES-459
URL: http://issues.apache.org/jira/browse/MYFACES-459
Project: MyFaces
Type: Bug
Components: JSR-127
Versions: 1.0.9 beta
Reporter: sean schofield
If your converter has a date format of "MM/DD/YYYY" and you supply it the String "9/5/05" the date should *not* be allowed. From the spec (javadoc): "In all cases, parsing must be non-lenient; the given string must strictly adhere to the parsing format."
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-459) DateTimeConverter should not allow lenient date formatting
Posted by "Keijo Nurmes (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-459?page=comments#action_12320542 ]
Keijo Nurmes commented on MYFACES-459:
--------------------------------------
I think that 35.01.2005 (DD.MM.YYY) type of dates should not be converted to valid dates either.
Now 35.01.2005 converts to 4.2.2005 ....
This little patch takes care of it....
Index: api/src/java/javax/faces/convert/DateTimeConverter.java
===================================================================
--- api/src/java/javax/faces/convert/DateTimeConverter.java (revision 231413)
+++ api/src/java/javax/faces/convert/DateTimeConverter.java (working copy)
@@ -69,7 +69,7 @@
if (value.length() > 0)
{
DateFormat format = getDateFormat();
- format.setLenient(true);
+ format.setLenient(false);
TimeZone tz = getTimeZone();
if( tz != null )
format.setTimeZone( tz );
> DateTimeConverter should not allow lenient date formatting
> ----------------------------------------------------------
>
> Key: MYFACES-459
> URL: http://issues.apache.org/jira/browse/MYFACES-459
> Project: MyFaces
> Type: Bug
> Components: JSR-127
> Versions: 1.0.9 beta
> Reporter: sean schofield
>
> If your converter has a date format of "MM/DD/YYYY" and you supply it the String "9/5/05" the date should *not* be allowed. From the spec (javadoc): "In all cases, parsing must be non-lenient; the given string must strictly adhere to the parsing format."
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (MYFACES-459) DateTimeConverter should not allow lenient date formatting
Posted by "sean schofield (JIRA)" <my...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-459?page=all ]
sean schofield closed MYFACES-459:
----------------------------------
Fix Version: Nightly Build
Resolution: Fixed
> DateTimeConverter should not allow lenient date formatting
> ----------------------------------------------------------
>
> Key: MYFACES-459
> URL: http://issues.apache.org/jira/browse/MYFACES-459
> Project: MyFaces
> Type: Bug
> Components: JSR-127
> Versions: 1.0.9 beta
> Reporter: sean schofield
> Assignee: sean schofield
> Fix For: Nightly Build
>
> If your converter has a date format of "MM/DD/YYYY" and you supply it the String "9/5/05" the date should *not* be allowed. From the spec (javadoc): "In all cases, parsing must be non-lenient; the given string must strictly adhere to the parsing format."
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira