private Instant getInstant(final AtomicReference<Instant> ref, final String headerName) {
        Instant instant = ref.get();
        if (instant == null) {
            instant = DateUtils.parseStandardDate(this, headerName);
            if (instant == null) {
                instant = NON_VALUE;
            }
            if (!ref.compareAndSet(null, instant)) {
                instant = ref.get();
            }
        }
        return instant != null && instant != NON_VALUE ? instant : null;
    }
Gets the Date value of the "Date" header or null if the header is missing or cannot be
parsed.

@since 4.3
httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpCacheEntry.java