code: public String format(Object expression, Object objPattern) {
          if (objPattern instanceof String) {
              final String pattern = filterPattern((String) objPattern);
              if (expression == null) {
                  return null;
              }
              if (expression instanceof LocalDate) {
                  return create((LocalDate) expression).toDisp(pattern);
              }
              if (expression instanceof LocalDateTime) {
                  return create((LocalDateTime) expression).toDisp(pattern);
              }
              if (expression instanceof java.util.Date) {
                  return create((java.util.Date) expression).toDisp(pattern);
              }
              if (expression instanceof String) {
                  return create((String) expression).toDisp(pattern);
              }
              String msg =
                      "First argument as two arguments should be LocalDate or LocalDateTime or Date or String(expression): " + expression;
              throw new TemplateProcessingException(msg);
          }
          String msg = "Second argument as two arguments should be String(pattern): objPattern=" + objPattern;
          throw new TemplateProcessingException(msg);
      }
docs: Get formatted date string.
  @param expression Date expression. (NullAllowed: if null, returns null)
  @param objPattern date format pattern. (NotNull)
  @return formatted date string. (NullAllowed: if expression is null.)