Jump to content

Topic on Help talk:Extension:ParserFunctions/2020-2024

English ordinals in {{#time:}}

2
Alex Mashin (talkcontribs)

It seems to me, that the English ordinal suffixes in date formats in {{#time:}} are not supported: {{#time:jS F Y|January 20, 2000}} gives 20S January 2000 rather than 20th January 2000.

Matěj Suchánek (talkcontribs)

I don't see a support for them as well. It's probably worth making a feature request as other languages may also benefit from this. A workaround can be a template like:

{{{1}}}{{#switch: {{#expr: {{{1}}} mod 100 }}
 | 11 | 12 | 13 = th
 | #default = {{#switch: {{#expr: {{{1}}} mod 10 }}
  | 1 = st | 2 = nd | 3 = rd
  | #default = th
 }}
}}