{{ entry.postDate|date('jS F Y \at ga') }}This should produce this 5th November 2016 at 4ambut it doesn't seem to recognise the escape and adds 30 instead of at.
Asked
Active
Viewed 50 times
1 Answers
1
You'll actually need to add a double backwards slash in front of each character you want to escape, i.e.
{{ entry.postDate|date('jS F Y \\a\\t ga') }}
See the official Twig docs for more info.
Mats Mikkel Rummelhoff
- 22,361
- 3
- 38
- 69
-
Thanks Mats, I followed the php date reference link in our Craft manual... – Nutmeg Nov 09 '16 at 01:23