Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-10 14:33:49

sirNemanjapro
Member
From: Čačak, Serbia
Registered: 2007-12-08
Posts: 59
Website

date() function question

When I want to display for example the name of the month with three letters I use “M” ( in php ), when I want to display day in a two digit number I use “j”.

Basically what Im asking for is, how do I display those things?


“… they were enterprising voyages…” – Mr. Spock ( from Spock vs. Q )

Offline

#2 2007-12-10 15:00:59

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: date() function question

And the short answer is:

<txp:php>echo date("M j");</txp:php>

Or if you need those to display article-publishing date, use txp:posted

<txp:posted format="%b %d" />

Cheers!

Last edited by Gocom (2007-12-10 15:01:22)

Offline

#3 2007-12-10 21:50:02

sirNemanjapro
Member
From: Čačak, Serbia
Registered: 2007-12-08
Posts: 59
Website

Re: date() function question

Thanks a million!


“… they were enterprising voyages…” – Mr. Spock ( from Spock vs. Q )

Offline

Board footer

Powered by FluxBB