minor bug fixes from moving interfaces
[org.ibex.js.git] / src / org / ibex / js / JSDate.java
index b90da68..5e5eaaf 100644 (file)
@@ -100,8 +100,6 @@ public class JSDate extends JS.Immutable {
                 // fall through
             }
             default: {
-                JS[] args = new JS[nargs];
-                for(int i=0; i<nargs; i++) args[i] = i==0 ? a0 : i==1 ? a1 : i==2 ? a2 : rest[i-3];
                 //#switch(Script.toString(method))
                 case "setMilliseconds": return Script.N(this.makeTime(args, 1, true));
                 case "setUTCMilliseconds": return Script.N(this.makeTime(args, 1, false));
@@ -902,8 +900,8 @@ public class JSDate extends JS.Immutable {
             }
             case 1: {
                 double date;
-                if(Script.isString(a0))
-                    date = date_parseString(Script.toString(a0));
+                if(Script.isString(args[0]))
+                    date = date_parseString(Script.toString(args[0]));
                 else
                     date = _toNumber(args[0]);
                 obj.date = TimeClip(date);