You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org> on 2013/10/30 12:14:25 UTC

[jira] [Resolved] (TAP5-2173) Tapestry DateField converts invalid dates to valid ones.

     [ https://issues.apache.org/jira/browse/TAP5-2173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiago H. de Paula Figueiredo resolved TAP5-2173.
-------------------------------------------------

    Resolution: Duplicate

Duplicate of TAP5-1998.

> Tapestry DateField converts invalid dates to valid ones.
> --------------------------------------------------------
>
>                 Key: TAP5-2173
>                 URL: https://issues.apache.org/jira/browse/TAP5-2173
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Barry Books
>
> The combination of the DateField component and the conversion of strings to SimpleDateFormat result in the DateField converting invalid dates to valid ones. There are really two problems. The default for SimpleDateFormat is lenient so strings are converted with lenient set to true. This causes the date conversion to changes dates like 9/32/2013 to Wed Oct 02 00:00:00 CDT 2013. The second problem is DateField allows extra characters after the valid part of the date. For example 9/01/2013ffff converts to Sun Sep 01 00:00:00 CDT 2013. This is more of a problem with formats such as yyyy-MM-dd because a date such as 2013-09-061 is allowed and converted to Thu Oct 31 00:00:00 CDT 2013.



--
This message was sent by Atlassian JIRA
(v6.1#6144)