function parseAscTimeDate (date) {
  // This is assumed to be in UTC

  if (date.length !== 24) {
    return undefined
  }

  for (const spaceIdx of ASCTIME_SPACES) {
    if (date[spaceIdx] !== ' ') {
      return undefined
    }
  }

  const dayName = date.substring(0, 3)
  if (!IMF_DAYS.includes(dayName)) {
    return undefined
  }

  const month = date.substring(4, 7)
  const monthIdx = IMF_MONTHS.indexOf(month)
  if (monthIdx === -1) {
    return undefined
  }

  const dayString = date.substring(8, 10)
  const day = Number.parseInt(dayString)
  if (isNaN(day) || (day < 10 && dayString[0] !== ' ')) {
    return undefined
  }

  const hourString = date.substring(11, 13)
  const hour = Number.parseInt(hourString)
  if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) {
    return undefined
  }

  const minuteString = date.substring(14, 16)
  const minute = Number.parseInt(minuteString)
  if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) {
    return undefined
  }

  const secondString = date.substring(17, 19)
  const second = Number.parseInt(secondString)
  if (isNaN(second) || (second < 10 && secondString[0] !== '0')) {
    return undefined
  }

  const year = Number.parseInt(date.substring(20, 24))
  if (isNaN(year)) {
    return undefined
  }

  return new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
}
@see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats

@param {string} date
@returns {Date | undefined}