Interface DateFormatter

All Known Implementing Classes:
DateTimeFormatterAdapter, SimpleDateFormatAdapter

public interface DateFormatter
Allows defines a wrapper around different formatting APIs, like old SimpleDateFormat and new DateTimeFormatter introduced in Java 8 Date/Time API

New instance will be injected using StrutsConstants.STRUTS_DATE_FORMATTER

  • Method Summary

    Modifier and Type
    Method
    Description
    format(TemporalAccessor temporal, String format)
    Formats provided temporal with the given format
  • Method Details

    • format

      String format(TemporalAccessor temporal, String format)
      Formats provided temporal with the given format
      Parameters:
      temporal - Java 8 TemporalAccessor
      format - implementation specific format
      Returns:
      a string representation of the formatted `temporal`