Package liqp.filters

Class Date


public class Date extends Filter
  • Constructor Details

  • Method Details

    • apply

      public Object apply(Object value, TemplateContext context, Object... params)
      Description copied from class: Filter
      Applies the filter on the 'value', with the given 'context'.
      Overrides:
      apply in class Filter
      Parameters:
      value - the string value `AAA` in: `{{ 'AAA' | f:1,2,3 }}`
      context - the template context.
      params - the values [1, 2, 3] in: `{{ 'AAA' | f:1,2,3 }}`
      Returns:
      the result of the filter.
    • addDatePattern

      public static void addDatePattern(String pattern)
      Adds a new Date-pattern to be used when parsing a string to a Date.
      Parameters:
      pattern - the pattern.
    • removeDatePattern

      public static void removeDatePattern(String pattern)
      Removed a Date-pattern to be used when parsing a string to a Date.
      Parameters:
      pattern - the pattern.
    • withCustomDateType

      public static Filter withCustomDateType(CustomDateFormatSupport<?> typeSupport)