Class HttpDateUtils


  • public class HttpDateUtils
    extends Object
    Date parsing utils.

    Handles reusing date formatters, as well as which date formats that will be used to parse various headers.

    • Constructor Detail

      • HttpDateUtils

        public HttpDateUtils()
    • Method Detail

      • format

        public static String format​(Date date)
        Format the given date into Swagger RFC3339 date-time format.

        Milliseconds won’t be included if they are zero.

        Parameters:
        date - The date to format.
        Returns:
        The formatted date.
      • formatAlwaysIncludeMillis

        public static String formatAlwaysIncludeMillis​(Date date)
        Format the given date into Swagger RFC3339 date-time format.

        Milliseconds will always be included.

        Parameters:
        date - The date to format.
        Returns:
        Formatted date.