From f8a7d417cb916b81cfa685175f3e6afbe6063cee Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 29 Jan 2023 05:44:21 +0300 Subject: SQLite support --- .../pebble/extension/filters/TimestampFilter.java | 42 ---------------------- 1 file changed, 42 deletions(-) delete mode 100644 src/main/java/com/mitchellbosecke/pebble/extension/filters/TimestampFilter.java (limited to 'src/main/java/com/mitchellbosecke/pebble/extension/filters/TimestampFilter.java') diff --git a/src/main/java/com/mitchellbosecke/pebble/extension/filters/TimestampFilter.java b/src/main/java/com/mitchellbosecke/pebble/extension/filters/TimestampFilter.java deleted file mode 100644 index dfe93673..00000000 --- a/src/main/java/com/mitchellbosecke/pebble/extension/filters/TimestampFilter.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2008-2020, Juick - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package com.mitchellbosecke.pebble.extension.filters; - -import io.pebbletemplates.pebble.extension.Filter; -import io.pebbletemplates.pebble.template.EvaluationContext; -import io.pebbletemplates.pebble.template.PebbleTemplate; - -import java.time.Instant; -import java.util.Date; -import java.util.List; -import java.util.Map; - -public class TimestampFilter implements Filter { - @Override - public Object apply(Object input, Map args, PebbleTemplate self, EvaluationContext context, int lineNumber) { - if (input instanceof Instant) { - return Date.from((Instant)input); - } - throw new IllegalArgumentException("invalid input"); - } - - @Override - public List getArgumentNames() { - return null; - } -} -- cgit v1.2.3