docs: function dateFromConfig(config) {
          var i, date, input = [], currentDate, yearToUse;
  
          if (config._d) {
              return;
          }
  
          currentDate = currentDateArray(config);
  
          //compute day of the year from weeks and weekdays
          if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
              dayOfYearFromWeekInfo(config);
          }
  
          //if the day of the year is set, figure out what it is
          if (config._dayOfYear) {
              yearToUse = dfl(config._a[YEAR], currentDate[YEAR]);
  
              if (config._dayOfYear > daysInYear(yearToUse)) {
                  config._pf._overflowDayOfYear = true;
              }
  
              date = makeUTCDate(yearToUse, 0, config._dayOfYear);
              config._a[MONTH] = date.getUTCMonth();
              config._a[DATE] = date.getUTCDate();
          }
  
          // Default to current date.
          // * if no year, month, day of month are given, default to today
          // * if day of month is given, default month and year
          // * if month is given, default only year
          // * if year is given, don't default anything
          for (i = 0; i < 3 && config._a[i] == null; ++i) {
              config._a[i] = input[i] = currentDate[i];
          }
  
          // Zero out whatever was not defaulted, including time
          for (; i < 7; i++) {
              config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
          }
  
          // Check for 24:00:00.000
          if (config._a[HOUR] === 24 &&
                  config._a[MINUTE] === 0 &&
                  config._a[SECOND] === 0 &&
                  config._a[MILLISECOND] === 0) {
              config._nextDay = true;
              config._a[HOUR] = 0;
          }
  
          config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
          // Apply timezone offset from input. The actual utcOffset can be changed
          // with parseZone.
          if (config._tzm != null) {
              config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
          }
  
          if (config._nextDay) {
              config._a[HOUR] = 24;
          }
      }