[Jifty-commit] r1763 - in jifty/trunk: share/web/static/js/yui

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Aug 5 15:01:45 EDT 2006


Author: trs
Date: Sat Aug  5 15:01:42 2006
New Revision: 1763

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/share/web/static/js/yui/calendar.js

Log:
 r15093 at zot:  tom | 2006-08-05 15:01:29 -0400
 Explicitly specify a radix of 10 (decimal) for the parseInt calls used in Yahoo's calendar widget when parsing the date to initially display


Modified: jifty/trunk/share/web/static/js/yui/calendar.js
==============================================================================
--- jifty/trunk/share/web/static/js/yui/calendar.js	(original)
+++ jifty/trunk/share/web/static/js/yui/calendar.js	Sat Aug  5 15:01:42 2006
@@ -512,8 +512,10 @@
 	if (monthyear)
 	{
 		var aMonthYear = monthyear.split(this.Locale.DATE_FIELD_DELIMITER);
-		month = parseInt(aMonthYear[this.Locale.MY_MONTH_POSITION-1]);
-		year = parseInt(aMonthYear[this.Locale.MY_YEAR_POSITION-1]);
+        /* The following two calls to parseInt had an explicit radix added
+           so dates with leading zeros aren't parsed as octal. */
+		month = parseInt(aMonthYear[this.Locale.MY_MONTH_POSITION-1], 10);
+		year = parseInt(aMonthYear[this.Locale.MY_YEAR_POSITION-1], 10);
 	} else {
 		month = this.today.getMonth()+1;
 		year = this.today.getFullYear();


More information about the Jifty-commit mailing list