Display custom date format + ordinal suffix
Posted
#4855
(In Topic #980)
I've only been able to achieve showing the ordinal suffix by adding a new symbol that does this automatically ({$ORDINAL}) but I have to split up the date in multiple {$FROM_TIMESTAMP} symbols to use this method. Frankly, it looks kinda hideous:
Code
{$FROM_TIMESTAMP*,%b,{ADD_DATE_RAW}} {$ORDINAL,{$FROM_TIMESTAMP*,%e,{ADD_DATE_RAW}}} {$FROM_TIMESTAMP*,%Y\, %l:%M %p,{ADD_DATE_RAW}}The above works, but I was hoping for a much simpler way of doing this. According to a user comment on php.net, we can use a %O (capital 'o') parameter to display the ordinal suffix (though it's not officially documented as supported using php's strftime).
I tried this but it doesn't work:
Code
{$FROM_TIMESTAMP*,%b %e %O %Y\, %l:%M %p,{ADD_DATE_RAW}}
Posted
0 guests and 0 members have recently viewed this.
