code: function whichFormatGenerator(formatRegex, regexMap) {
    return function whichFormat(value) {
      if (formatRegex.test(value)) {
        var regexes = Object.keys(regexMap);
        for (var i = 0; i < regexes.length; i++) {
          var regex = regexes[i];
          var format = regexMap[regex];
          var newRegex = new RegExp(regex);
          if (newRegex.test(value)) {
            return format;
          }
        }
      }
      return false;
    };
  }
docs: /* eslint-disable max-len 
  Generate a function to discover which time format a value is
  @param {Regex} formatRegex - the filter to be checked and processed
  @param {Object} regexMap - Map between regex and associated format
  @return {Func} to the format checker