org.apache.struts2.components.date

## 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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `format(TemporalAccessor temporal, String format)` Formats provided temporal with the given format

- - ### Method Detail

    - #### 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`

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.