Here you see how date from JSON can be formatted by twig.
Example of JSON with dates: https://api.json-content-importer.com/extra/json/date.php
For that create a JCI-Template with:
- URL: https://api.json-content-importer.com/extra/json/date.php
- Name: dateformatting
- twig-code:
See https://www.php.net/manual/en/function.date.php for the Syntax in date(“…”)
time: {{time}}<br> time-formatted: {{ time | date("l d.m.Y") }}<br> date: {{date}}<br> date-formatted: {{ date | date("l d.m.Y") }}<br> otherdate: {{otherdate}}<br> otherdate-formatted: {{ otherdate | date("l d.m.Y H:i:s") }}<br>
Then add [jsoncontentimporterpro nameoftemplate="dateformatting"] to a page:
curlGET failed, http-code: 301