]
Francisco Jose Peredo Noguez updated RF-8136:
---------------------------------------------
JBoss Forum Reference:
Richfaces.Calendar.parseDate using pattern "yyMMdd" is
incompatible with java.text.SimpleDateFormat
---------------------------------------------------------------------------------------------------
Key: RF-8136
URL:
https://jira.jboss.org/jira/browse/RF-8136
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.3.1
Reporter: Francisco Jose Peredo Noguez
I have a rich calendar configured with the pattern "yyMMdd"
If the user writes 600210 and the user clicks the little calendar button to show the
popup, he can see that the date has been translated to "February 10 of 2060" but
if he writes 700210 it is translated in to "February 10 of 1970". That is not
consistent the behavior of java.text.SimpleDateFormat.
The problem is at the file
3.3.1.GA\ui\calendar\src\main\resources\org\richfaces\renderkit\html\scripts\calendar.js
(line 394 of the file):
At the function Richfaces.Calendar.parseDate = function(dateString, pattern, monthNames,
monthNamesShort) method:
var yy = parseInt(match[y],10); if (isNaN(yy)) return null; else if (yy<70) yy+=2000;
else if (yy<100) yy+=1900;
That code translates the year in 600210 to 2060 when it should translate it to 1960 (to
be consistent with java.text.SimpleDateFormat behavior.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: