Date format configuration

How to configure the formatting of the dates displayed by the guestbook using the options in the backend.

You can format the date any way you want, see this page on the Joomla! docs site for inspiration. VitaBook uses DATE_FORMAT_LC2 by default.

VitaBook also supports relative dates, just enter relative in the configuration field like in the image above.


This information was originally posted on the Joomla! docs. But has already been moved once and might disappear entirely in the future, a local copy of the page is available below.

The date format information for Joomla! 1.5 is stored in the file <Joomla! home>/language/<your language>/<your language>.ini. For example, for English, it is <Joomla! home>/en-GB/en-GB.ini.

To change the date format, find and edit the values "DATE_FORMAT_LCx". By default, the date is in international format (for example, Thursday, 31 January 2008 18:30). To change to standard US format (for example, Thursday, January 31, 2008, 06:30 PM), make the following changes:

DATE_FORMAT_LC2=%A, %B %d, %Y %I:%M %p
%A, %B %E=%A, %B %e

These are the formats for the time...

%H:%M = 00:00 through 23:59
%k:%M = 0:00 through 23:59
%I:%M %P = 00:00 am through 23:59 pm (I = upercase i)
%l:%M %P= 0:00 am through 23:59 pm (l = lowercase L)

(Note that %P will print the lowercase am/pm indicator for your locale, which may be blank.)

%I:%M %p = 00:00 AM through 23:59 PM (I = upercase i)
%l:%M %p= 0:00 AM through 23:59 PM (l = lowercase L)

...and for the day

d - Day of the month, two digits with leading zeros - 01 to 21
D - Day in text, three letters - Sun through Sat
j - Day of the month, one or two digits without leading zeros - 1 to 31
l (lowercase L) - Day in text, complete word - Sunday through Saturday

Joomla! uses standard Linux date format codes. A complete reference is avaialable in the PHP Manual.