@Override
    public void parse(final SetCookie cookie, final String value) throws MalformedCookieException {
        Args.notNull(cookie, "Cookie");
        if (TextUtils.isBlank(value)) {
            return;
        }
        final Matcher matcher = MAX_AGE_PATTERN.matcher(value);
        if (matcher.matches()) {
            final int age;
            try {
                age = Integer.parseInt(value);
            } catch (final NumberFormatException e) {
                return;
            }
            final Instant expiryDate = age >= 0 ? Instant.now().plusSeconds(age) :
                    Instant.EPOCH;
            cookie.setExpiryDate(expiryDate);
        }
    }
Default instance of {@link LaxMaxAgeHandler}.

@since 5.2
httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/LaxMaxAgeHandler.java