Interface HttpDateFormat.HttpDateFormatter

Enclosing class:
HttpDateFormat

public static interface HttpDateFormat.HttpDateFormatter

A minimum formatter for converting java Date and LocalDateTime to String and vice-versa.

Works as a facade for implementation backed by SimpleDateFormat and DateTimeFormatter.

  • Method Details

    • toDate

      Date toDate(String date)
      Parameters:
      date -
      Returns:
    • toDateTime

      LocalDateTime toDateTime(String date)
      Parameters:
      date -
      Returns:
    • format

      String format(Date date)
      Formats a Date into a date-time string.
      Parameters:
      date - the time value to be formatted into a date-time string.
      Returns:
      the formatted date-time string.
    • format

      String format(LocalDateTime dateTime)
      Formats a LocalDateTime into a date-time string.
      Parameters:
      dateTime - the time value to be formatted into a date-time string.
      Returns:
      the formatted date-time string.