+ obj.date = TimeClip(date);
+ return;
+ }
+ default: {
+ // multiple arguments; year, month, day etc.
+ double array[] = new double[MAXARGS];
+ array[0] = toDouble(a0);
+ array[1] = toDouble(a1);
+ if (nargs >= 2) array[2] = toDouble(a2);
+ for(int i=0; i<nargs; i++) {
+ double d = _toNumber(i==0?a0:i==1?a1:i==2?a2:rest[i-3]);
+ if (d != d || Double.isInfinite(d)) {
+ obj.date = Double.NaN;
+ return;
+ }
+ array[i] = d;
+ }
+
+ /* adjust 2-digit years into the 20th century */
+ if (array[0] >= 0 && array[0] <= 99)
+ array[0] += 1900;
+
+ /* if we got a 0 for 'date' (which is out of range)
+ * pretend it's a 1 */
+ if (array[2] < 1)
+ array[2] = 1;
+
+ double day = MakeDay(array[0], array[1], array[2]);
+ double time = MakeTime(array[3], array[4], array[5], array[6]);
+ time = MakeDate(day, time);
+ time = internalUTC(time);
+ obj.date = TimeClip(time);
+
+ return;