Actions

J1.5

Difference between revisions of "How do you change the date format?"

From Joomla! Documentation

(faq on date format)
 
m (clean up categories with <noinclude> tags)
(4 intermediate revisions by 3 users not shown)
Line 12: Line 12:
 
  %A, %B %E=%A, %B %e
 
  %A, %B %E=%A, %B %e
  
These are the formats for the time
+
These are the formats for the time...
 
  %H:%M = 00:00 through 23:59
 
  %H:%M = 00:00 through 23:59
 
  %k:%M = 0:00 through 23:59
 
  %k:%M = 0:00 through 23:59
Line 18: Line 18:
 
  %I:%M %P = 00:00 am through 23:59 pm (I = upercase i)
 
  %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)
 
  %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)
 
  %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)
 
  %l:%M %p= 0:00 AM through 23:59 PM (l = lowercase L)
  
Joomla! uses standard Linux date format codes. These codes are listed at the following link: [http://linux.about.com/od/commands/l/blcmdl1_date.htm http://linux.about.com/od/commands/l/blcmdl1_date.htm].
+
...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 [http://nl3.php.net/manual/en/function.date.php PHP Manual].
 +
 
 +
<noinclude>[[Category:FAQ]]
 +
[[Category:Administration FAQ]]
 +
[[Category:Version 1.5 FAQ]]</noinclude>

Revision as of 15:33, 1 September 2012

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

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_LC=%A, %B %d, %Y
DATE_FORMAT_LC1=%A, %B %d, %Y
DATE_FORMAT_LC2=%A, %B %d, %Y %I:%M %p
DATE_FORMAT_LC3=%B %d, %Y
DATE_FORMAT_LC4=%m.%d.%y
DATE_FORMAT_JS1=m-d-y
%Y-%M-%D=%Y-%M-%D
%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.