I'm trying to find a method of escaping characters in Craft's DateTime
object.
This is the output I'm trying to achieve: 16th January 2016
This is what I've tried: {{ article.postDate.format('j\<\s\u\p\>S\<\/\s\u\p\> F Y') }}
This is the output: 16<00000000p>th<!--00000000p--> January 2016
I can achieve the output by appending output together but there has to be a better way of achieving this than the following:
{{ article.postDate.format('j') }}<sup>{{ article.postDate.format('S') }}</sup> {{ article.postDate.format(' F Y') }}
Any pointers to documentation would be appreciated.