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 2005/06/28 21:02:45 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
mkwan 2005/06/28 12:02:45
Modified: java/src/org/apache/xalan/lib ExsltDatetime.java
Log:
Patch for XALANJ-2076. Fix a bug in date:month-in-year.
Revision Changes Path
1.15 +4 -4 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.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ExsltDatetime.java 10 Jan 2005 15:03:20 -0000 1.14
+++ ExsltDatetime.java 28 Jun 2005 19:02:45 -0000 1.15
@@ -264,7 +264,7 @@
}
/**
- * The date:year function returns the month of a date as a number. If no argument
+ * The date:month-in-year function returns the month of a date as a number. If no argument
* is given, then the current local date/time, as returned by date:date-time is used
* as a default argument.
* The date/time string specified as the first argument is a left or right-truncated
@@ -288,7 +288,7 @@
return Double.NaN;
String[] formats = {dt, d, gym, gm, gmd};
- return getNumber(datetime, formats, Calendar.MONTH);
+ return getNumber(datetime, formats, Calendar.MONTH) + 1;
}
/**
@@ -297,7 +297,7 @@
public static double monthInYear()
{
Calendar cal = Calendar.getInstance();
- return cal.get(Calendar.MONTH);
+ return cal.get(Calendar.MONTH) + 1;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org