public static boolean isNewer(final HttpCacheEntry entry, final MessageHeaders message) {
        if (entry == null || message == null) {
            return false;
        }
        final Instant cacheDate = entry.getInstant();
        if (cacheDate == null) {
            return false;
        }
        final Instant messageDate = DateUtils.parseStandardDate(message, HttpHeaders.DATE);
        if (messageDate == null) {
            return false;
        }
        return cacheDate.compareTo(messageDate) > 0;
    }
Tests if the given {@link HttpCacheEntry} is newer than the given {@link MessageHeaders}
by comparing values of their {@literal DATE} header. In case the given entry, or the message,
or their {@literal DATE} headers are null, this method returns {@code false}.

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