Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-03-12 19:37:32

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

ordinal suffixes?

in the following tag

<txp:posted format=”%B %d, %y” gmt=“1” />

how would I be able to put in the “th/st/rd” suffixes?

this conversion specifier

%od

will not work.

so any ideas?

Last edited by Ruhh (2008-03-12 19:54:43)


<txp:Ruhh />

Offline

#2 2008-03-12 21:24:00

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: ordinal suffixes?

Try %D instead of %d.


Code is topiary

Offline

#3 2008-03-12 21:32:19

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: ordinal suffixes?

nope, doesn’t work.


<txp:Ruhh />

Offline

#4 2008-03-12 21:40:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: ordinal suffixes?

txp:posted use strftime format codes which, I think, do not support things like 1th, 2nd, 3rd.

Offline

#5 2008-03-13 18:54:12

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: ordinal suffixes?

Ruud is correct.

While date has ordinal suffixes, we’ve used strftime in Textpattern because the date/time need to be translatable.

But, all is not lost. You just need to grab a plugin.

Offline

#6 2008-03-13 23:01:42

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: ordinal suffixes?

i think i have found a different plugin rather than jad_oldposted. it is the asy_showdate.


<txp:Ruhh />

Offline

Board footer

Powered by FluxBB