(Date date, int type)
| 771 | } |
| 772 | |
| 773 | String formatDate(Date date, int type) throws TemplateModelException { |
| 774 | DateFormat df = getDateFormatObject(type); |
| 775 | if(df == null) { |
| 776 | throw new TemplateModelException("Can't convert the date to string, because it is not known which parts of the date variable are in use. Use ?date, ?time or ?datetime built-in, or ?string.<format> or ?string(format) built-in with this date."); |
| 777 | } |
| 778 | return df.format(date); |
| 779 | } |
| 780 | |
| 781 | public void setTimeFormat(String formatName) { |
| 782 | super.setTimeFormat(formatName); |
no test coverage detected