PebbleTemplates / pebble

Java Template Engine
https://pebbletemplates.io
BSD 3-Clause "New" or "Revised" License
1.09k stars 166 forks source link

DateFilter does not parse string dates with the default dateFormat #676

Open markolo25 opened 4 months ago

markolo25 commented 4 months ago

according to the documentation

If you don't provide a pattern, either DateTimeFormatter.ISO_DATE_TIME or yyyy-MM-dd'T'HH:mm:ssZ will be used.

however this logic is not present in DateFilter.java, and if you do not provide an existingFormat parameter and you pass in a string it goes straight into an IllegalArgumetnException image

markolo25 commented 4 months ago

Created PR #677 to fix this issue.