Content last modified Tuesday 24 August 2021
hop to #bottom
Author's website
About It:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Changing the Date Format

You probably know you can change the Date format, Archive date format, and Comments date format by hitting up your ‘admin’ tab and ‘preferences’ tab underneath that, in your Admin panel. ( )

You can also override this format, by supplying the Textpattern tag, <txp:posted />, with one argument, “format”.

In all pre-1.0RC3 versions, this tag relies upon the formats allowed by the PHP function, date(). Example:
<txp:posted format="d m Y" />

In version 1.0RC3 and forwards, this tag relies upon the formats allowed by the PHP function, strftime(). Example:
<txp:posted format="%d %m %Y" />

These two formats cannot be “mixed and matched”. Only date() format strings will work in pre-1.0RC3 versions, and only strftime() format strings will work hereafter.

The reason for the switch was to enable date and time localisation.

Should you desire to use the date() format in 1.0RC3 or greater, a plugin is available that will enable you to do so. Example:
<txp:jad_oldposted format="d m Y" />

(additional thanks to Beate)

Article Request Count:
Initially released:
Posted here:
30 Nov 2004

You know you want to visit the Archives.
Published with Textpattern