docs: private static Object jsConstructor(Object[] args)
      {
          NativeDate obj = new NativeDate();
  
          // if called as a constructor with no args,
          // return a new Date with the current time.
          if (args.length == 0) {
              obj.date = now();
              return obj;
          }
  
          // if called with just one arg -
          if (args.length == 1) {
              Object arg0 = args[0];
              if (arg0 instanceof NativeDate) {
                  obj.date = ((NativeDate) arg0).date;
                  return obj;
              }
              if (arg0 instanceof Scriptable) {
                  arg0 = ((Scriptable) arg0).getDefaultValue(null);
              }
              double date;
              if (arg0 instanceof CharSequence) {
                  // it's a string; parse it.
                  date = date_parseString(arg0.toString());
              } else {
                  // if it's not a string, use it as a millisecond date
                  date = ScriptRuntime.toNumber(arg0);
              }
              obj.date = TimeClip(date);
              return obj;
          }
  
          double time = date_msecFromArgs(args);
  
          if (!Double.isNaN(time) && !Double.isInfinite(time))
              time = TimeClip(internalUTC(time));
  
          obj.date = time;
  
          return obj;
      }