How to get date ordinals in date format
I'm using the following date format:
D MMMM YYYY
To display today's date: 5 October 2017
I can do the following to add the ordinal:
D\th MMMM YYYY
5th October 2017
But obviously this won't work correctly for e.g. 1st October 2017
Is there a way?
No, I hope.
However, if there is one it will heavily depend on the locale, and as far as I can tell the many
'English (somehing)'
locales may act differently. In the UK itself it is uncommon to use an ordinal mark in written dates. There may be thousands of excessively stubborn ways to write dates in the English speaking world.Your
D\th MMMM YYYY
does not work for me withUI=locale=DocLanguage= English (UK)
. Theh
is taken for "hour".