Interface DateTimePrinter

All Superinterfaces:
DatePrinter, org.apache.wicket.util.io.IClusterable, Serializable
All Known Implementing Classes:
DateTimePrinter.EmptyDateTimePrinter, DateTimePrinter.JavaDateTimePrinter

public interface DateTimePrinter extends DatePrinter
Utility for printing java date objects using the java.time classes. Takes care of setting the correct locale and timezone and prints the date and the time.
  • Method Details

    • print

      String print(FormatStyle dateStyle, FormatStyle timeStyle)
      Print with specified FormatStyles. Check here for all possible styles. The dateStyle will be used for the date part, the timeStyle for the time part.
      Parameters:
      dateStyle - the formatter style to use for the date part, not null
      timeStyle - the formatter style to use for the time part, not null
      Returns:
      the date as a string based the both styles
    • appendDST

      DateTimePrinter appendDST()
      Override appendDST to return a more specific implementation DateTimePrinter and allow proper method chaining.
      Specified by:
      appendDST in interface DatePrinter
      Returns:
      the DateTimePrinter instance
      See Also:
    • of

      static DateTimePrinter of(Date date)
    • of

      static DateTimePrinter of(Calendar calendar)
    • of

      static DateTimePrinter of(Instant instant)