 -1) {
        format = formatAsctime;
        return weekday;
      }
    } else {
      tmp = date.substring(index, pos);
      index = pos + 1;
      weekday = wkdays.indexOf(tmp);
      if (weekday != -1) {
        format = formatRfc1123;
        return weekday;
      }
      weekday = weekdays.indexOf(tmp);
      if (weekday != -1) {
        format = formatRfc850;
        return weekday;
      }
    }
    throw new HttpException(&quot;Invalid HTTP date $date&quot;);
  }

  int expectMonth(String separa