Revision: 4374
http://vexi.svn.sourceforge.net/vexi/?rev=4374&view=rev
Author: jeffbuhrt
Date: 2012-03-19 20:40:44 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
Reverse out #65 'fix'. Added: Note/caution: ECMA uses 0-11 for months, not
1-12. This applies to the constructor as well. (get it wrong, and 2/29 to 3/1
is 3 days ;) )
Modified Paths:
--------------
trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/ECMADate.jpp
Modified: trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/ECMADate.jpp
===================================================================
--- trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/ECMADate.jpp
2012-03-19 20:34:36 UTC (rev 4373)
+++ trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/ECMADate.jpp
2012-03-19 20:40:44 UTC (rev 4374)
@@ -133,6 +133,7 @@
/*@PAGE(varname=ECMADate,humanname=ECMADate Object)
*
* <p>The standard ECMA (or JS) date object.</p>
+ * <p>Note/caution: ECMA uses 0-11 for months, not 1-12. This applies
to the constructor as well.</p>
* */
/* <p>Returns the day of the month (1-31)</p>
* @return(Number) */
@@ -617,8 +618,8 @@
leap = (DaysInYear((int) year) == 366);
yearday = java.lang.Math.floor(TimeFromYear(year) / msPerDay);
- // DayFromMonth expects a 0 based month
- monthday = DayFromMonth((int) month-1, leap);
+ // CAUTION! DayFromMonth expects a 0 based month (0=Jan for ECMA)
+ monthday = DayFromMonth((int) month, leap);
result = yearday
+ monthday
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn