code: function makeDateFromStringAndArray(config) {
          var tempConfig,
              tempMoment,
              bestMoment,
  
              scoreToBeat = 99,
              i,
              currentDate,
              currentScore;
  
          while (config._f.length) {
              tempConfig = extend({}, config);
              tempConfig._f = config._f.pop();
              makeDateFromStringAndFormat(tempConfig);
              tempMoment = new Moment(tempConfig);
  
              if (tempMoment.isValid()) {
                  bestMoment = tempMoment;
                  break;
              }
  
              currentScore = compareArrays(tempConfig._a, tempMoment.toArray());
  
              if (currentScore < scoreToBeat) {
                  scoreToBeat = currentScore;
                  bestMoment = tempMoment;
              }
          }
  
          extend(config, bestMoment);
      }
docs: date from string and array of format strings