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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DateTimePrinter.EmptyDateTimePrinter
static class
DateTimePrinter.JavaDateTimePrinter
-
Nested classes/interfaces inherited from interface org.hippoecm.frontend.plugins.standards.datetime.DatePrinter
DatePrinter.EmptyDatePrinter, DatePrinter.JavaDatePrinter
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description DateTimePrinter
appendDST()
Override appendDST to return a more specific implementation DateTimePrinter and allow proper method chaining.static DateTimePrinter
of(Instant instant)
static DateTimePrinter
of(Calendar calendar)
static DateTimePrinter
of(Date date)
String
print(FormatStyle dateStyle, FormatStyle timeStyle)
Print with specified FormatStyles.-
Methods inherited from interface org.hippoecm.frontend.plugins.standards.datetime.DatePrinter
print, print, print
-
-
-
-
Method Detail
-
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 nulltimeStyle
- 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 interfaceDatePrinter
- Returns:
- the DateTimePrinter instance
- See Also:
DatePrinter.appendDST()
-
of
static DateTimePrinter of(Date date)
-
of
static DateTimePrinter of(Calendar calendar)
-
of
static DateTimePrinter of(Instant instant)
-
-