Change the Date Format in Joomla Articles

Change the Date Format in Joomla Articles

This quick tip will show you how to change the default date formatting in Joomla 1.5 articles by editing your language file.

Follow these steps

  1. Locate your language file from the root dir, for example: language/en-GB/en-GB.ini
  2. Around line 11 you will find the LC2 code DATE_FORMAT_LC2=%A, %d %B %Y
  3. Change this to the format you require, for example, to just display the month and year use: DATE_FORMAT_LC2=%B %Y
  • %A = locale’s full weekday name, variable length (Sunday..Saturday)
  • %d = day of month (01..31)
  • %B = locale’s full month name, variable length (January..December)
  • %Y = year (1970…)

Note: Joomla uses Linux/Unix Date Commands not the PHP date format. See here for a breakdown of the options: http://linux.about.com/od/commands/l/blcmdl1_date.htm

Note: Depending on what template you are using, your LC code may be different. To check this, look in the file located within you template dir: templates/yourtemplate/html/com_content/article/default.php

Enjoyed this post?

Subscribe to our RSS Feed, Follow on Twitter, Grab our monthly Newsletter.

About Jamie Brightmore

Jamie is a professional designer who runs 4mula design a creative design studio focused on web design & development, located in Cheltenham, Gloucestershire UK. Jamie is also a Serato turntablist who can be found scratching holes in vinyl in his spare time! Follow him on Twitter.

TOP