Class AbstractDateBean<T>

java.lang.Object
ch.tocco.nice2.templating.spi.freemarker.bean.AbstractNullableBean<T>
ch.tocco.nice2.templating.spi.freemarker.bean.AbstractDateBean<T>
All Implemented Interfaces:
NullableBean
Direct Known Subclasses:
DateTimeBean, LocalDateBean, LocalTimeBean

public abstract class AbstractDateBean<T> extends AbstractNullableBean<T>
This abstract class serves as a base class for date beans to represent date objects in freemarker
  • Constructor Details

    • AbstractDateBean

      protected AbstractDateBean(T delegate)
  • Method Details

    • print

      protected abstract String print(org.joda.time.format.DateTimeFormatter formatter)
    • pattern

      public String pattern(String pattern)
      Format the underlying LocalDate, DateTime or LocalTime using a pattern. See DateTimeFormat.forPattern(String) for more information on how to define a pattern.
    • style

      public String style(String style)
      Format the underlying LocalDate, DateTime or LocalTime using a style. See DateTimeFormat.forStyle(String) for more information on how to define a style.
    • format

      protected String format(org.joda.time.format.DateTimeFormatter formatter)
    • printPartial

      protected static Function<org.joda.time.ReadablePartial,String> printPartial(org.joda.time.format.DateTimeFormatter formatter)
    • printInstant

      protected static Function<org.joda.time.ReadableInstant,String> printInstant(org.joda.time.format.DateTimeFormatter formatter)