public static Instant parseDate(final String dateValue, final DateTimeFormatter... dateFormatters) {
        Args.notNull(dateValue, "Date value");
        String v = dateValue;
        // trim single quotes around date if present
        // see issue #5279
        if (v.length() > 1 && v.startsWith("'") && v.endsWith("'")) {
            v = v.substring (1, v.length() - 1);
        }

        for (final DateTimeFormatter dateFormatter : dateFormatters) {
            try {
                return Instant.from(dateFormatter.parse(v));
            } catch (final DateTimeException ignore) {
            }
        }
        return null;
    }
Parses the date value using the given date/time formats.
<p>This method can handle strings without time-zone information by failing gracefully, in which case
it returns {@code null}.</p>

@param dateValue the instant value to parse
@param dateFormatters the date/time formats to use

@return the parsed instant or null if input could not be parsed

@since 5.2
httpclient5/src/main/java/org/apache/hc/client5/http/utils/DateUtils.java