org.apache.hc.client5.http.impl.cache

## Class DateSupport

- java.lang.Object
- - org.apache.hc.client5.http.impl.cache.DateSupport

-     @Internal
      public final class DateSupport
      extends Object

  HTTP cache date support utilities.
  Since:
    5.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DateSupport()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isAfter(org.apache.hc.core5.http.MessageHeaders message1, org.apache.hc.core5.http.MessageHeaders message2, String headerName)` Tests if the first message is after (newer) than second one using the given message header for comparison.
    `static boolean` | `isBefore(org.apache.hc.core5.http.MessageHeaders message1, org.apache.hc.core5.http.MessageHeaders message2, String headerName)` Tests if the first message is before (older) than the second one using the given message header for comparison.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DateSupport

          public DateSupport()

  - ### Method Detail

    - #### isAfter

          public static boolean isAfter(org.apache.hc.core5.http.MessageHeaders message1,
                                        org.apache.hc.core5.http.MessageHeaders message2,
                                        String headerName)

      Tests if the first message is after (newer) than second one using the given message header for comparison.
      Parameters:
        `message1` - the first message
        `message2` - the second message
        `headerName` - header name
      Returns:
        `true` if both messages contain a header with the given name and the value of the header from the first message is newer that of the second message.
      Since:
        5.0

    - #### isBefore

          public static boolean isBefore(org.apache.hc.core5.http.MessageHeaders message1,
                                         org.apache.hc.core5.http.MessageHeaders message2,
                                         String headerName)

      Tests if the first message is before (older) than the second one using the given message header for comparison.
      Parameters:
        `message1` - the first message
        `message2` - the second message
        `headerName` - header name
      Returns:
        `true` if both messages contain a header with the given name and the value of the header from the first message is older that of the second message.
      Since:
        5.0

Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.