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/06 21:25:04 UTC
DO NOT REPLY [Bug 14312] New: -
ExsltDatetime hourInDay(String datetimeIn) does not work
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=14312>.
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=14312
ExsltDatetime hourInDay(String datetimeIn) does not work
Summary: ExsltDatetime hourInDay(String datetimeIn) does not work
Product: XalanJ2
Version: 2.4
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xalan.lib
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: rallen3@sybase.com
org.apache.xalan.lib.ExsltDatetime hourInDay(String datetimeIn) does not
work...it always returns "0". According to the documentation, this method
should support both xs:dateTime (CCYY-MM-DDThh:mm:ss) and xs:time (hh:mm:ss)
formats. However, it actually supports neither.
I believe that this line:
String[] formats = {d, t};
Should be changed to this:
String[] formats = {dt, t};
This solves the xs:dateTime support problem, but there seems to be another bug
when you try to use xs:time. This time, the error appears to be in the
testFormats method. If you use the xs:time format, it throws an exception after
the first parse attempt and never gets around to trying the correct format. I
don't know what should be tested, but this line doesn't work...
if (pe.getErrorOffset() < in.length())
pe.getErrorOffset() is always less than in.length()
If I comment it out, it works.