1

{{ 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.

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.

| improve this answer | |
  • Thanks Mats, I followed the php date reference link in our Craft manual... – Nutmeg Nov 9 '16 at 1:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.