You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/11/07 01:35:31 UTC
DO NOT REPLY [Bug 14322] New: -
ExsltDatetime getZoneStart doesn't work for gMonthDay
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: xalan-dev@xml.apache.org
ReportedBy: rallen3@sybase.com
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 )
)