You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mk...@apache.org on 2002/11/04 20:50:14 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
mkwan 2002/11/04 11:50:14
Modified: java/src/org/apache/xalan/lib ExsltDatetime.java
Log:
For Bugzilla 14237. Fix problems in the hour-in-day extension function.
Revision Changes Path
1.4 +2 -6 xml-xalan/java/src/org/apache/xalan/lib/ExsltDatetime.java
Index: ExsltDatetime.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/lib/ExsltDatetime.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ExsltDatetime.java 16 Sep 2002 15:52:14 -0000 1.3
+++ ExsltDatetime.java 4 Nov 2002 19:50:13 -0000 1.4
@@ -525,7 +525,7 @@
if (datetime == null)
return new XNumber(Double.NaN);
- String[] formats = {d, t};
+ String[] formats = {dt, t};
return new XNumber(getNumber(datetime, formats, Calendar.HOUR_OF_DAY));
}
@@ -874,9 +874,7 @@
/**
* Attempt to parse an input string with the allowed formats, returning
- * null if none of the formats work. Input formats are passed in longest to shortest,
- * so if any parse operation fails with a parse error in the string, can
- * immediately return null.
+ * null if none of the formats work.
*/
private static Date testFormats (String in, String[] formats)
throws ParseException
@@ -891,8 +889,6 @@
}
catch (ParseException pe)
{
- if (pe.getErrorOffset() < in.length())
- return null;
}
}
return null;
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org