DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14322>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14322 ExsltDatetime getZoneStart doesn't work for gMonthDay Summary: ExsltDatetime getZoneStart doesn't work for gMonthDay Product: XalanJ2 Version: 2.4 Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.lib AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] ExsltDatetime.monthInYear("09-14") will throw a parseException. However, it shouldn't pass the zone information test to throw the exception... The length of "12-15" is 5. (5 - 6 = -1), but "-1" means "+" wasn't found! This line: (datetime.indexOf("+") == datetime.length() -6) Should make test that datetime.indexOf("+") != -1 (datetime.indexOf("+") == datetime.length() - 6 && datetime.indexOf("+") != - 1 ) Fix: This if statement: else if ( (datetime.lastIndexOf("-") == datetime.length()-6 && datetime.charAt(datetime.length()-3) == ':') || (datetime.indexOf("+") == datetime.length() -6) ) should read: else if ( (datetime.lastIndexOf("-") == datetime.length()-6 && datetime.charAt(datetime.length()-3) == ':') || (datetime.indexOf("+") == datetime.length() - 6 && datetime.indexOf("+") != -1 ) )
