eZ Publish DateTime Operator Missing Ordinal Support
In redeveloping my blog over the past days I came across the fact Ordinals are not supported by the default datetime implementation in the eZ Publish template language. While I consider this an important function, it is of course the first time I have gone looking for it ever… strange.
In any case some people will be asking, “What is an ordinal?”. Ordinals are a 2 letter english suffix that are often added to days of the month “st, nd, rd, th”. PHP supports these functions using the ‘S’ character in the date function. Unfortunately eZ Publish 4.0 does not support handling the ‘S’ character in the datetime template operator.
I have lodged an enhancement request on the issue tracker at http://issues.ez.no/13300
I haven’t submitted a patch for this enhancement as yet, and due to a lack of time I haven’t had an opportunity to investigate how easily such a modification could be made. As time permits I will update the issue with the appropriate patch.
Has anyone else missed this option from the datetime implementation?
Update: Yes, while it is possible of course to manage such an implementation through the template language with some messy logic tests it is just against my principles. It should be handled by the underlying system and passed back already formatted.