Change Date format

General questions regarding the use of languages in Joomla! 2.5.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
ae6dx
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Sat Dec 11, 2010 8:55 am

Change Date format

Post by ae6dx » Mon Jun 18, 2012 12:34 am

I have followed http://docs.joomla.org/How_do_you_chang ... _format%3F for my site http://www.woodriverabilityprogram.org/joomla/ yet as you can see the date has not changed.

I'm using Joomla 2.5.4 and K2 2.5.7 and the Cloudbase 2.0 template

What am I doing wrong?
Brad

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28202
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Change Date format

Post by imanickam » Mon Jun 18, 2012 2:43 am

The document you are referencing is for Joomla! 1.5 - NOT for 2.5.

In 1.5, the UNIX date format is being used. In 1.7, the PHP date format is being used. Review of the site http://php.net/manual/en/function.date.php would be of help.

If you want to change the way the date shows, you have to change is the following formats that is available in the file en-GB.ini that located in the directory \language\en-GB

Code: Select all

DATE_FORMAT_LC="l, d F Y"
DATE_FORMAT_LC1="l, d F Y"
DATE_FORMAT_LC2="l, d F Y H:i"
DATE_FORMAT_LC3="d F Y"
DATE_FORMAT_LC4="Y-m-d"
DATE_FORMAT_JS1="y-m-d"
In 2.5, in the Language Manager, you have a tab for Language Overrides and you could use that for changing and testing the override language strings.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

ae6dx
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Sat Dec 11, 2010 8:55 am

Re: Change Date format

Post by ae6dx » Mon Jun 18, 2012 3:20 am

I guess your docs need updating then as I did a search for date format and only found that.

What do LC, LC1, LC2, etc mean? Why is there a separate format for each?
Brad

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28202
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Change Date format

Post by imanickam » Mon Jun 18, 2012 4:10 am

ae6dx wrote:I guess your docs need updating then as I did a search for date format and only found that.
Yes, you are correct. However, I would like a small correction - it is not "your docs", it is "our docs". Be informed that almost all the things that go around Joomla! (e.g., documentation, forum administration, forum moderation, etc.) are all done by volunteers such as you and me. So, I encourage/request your involvement in these activities as well.
ae6dx wrote:What do LC, LC1, LC2, etc mean? Why is there a separate format for each?
For example, in the articles the format DATE_FORMAT_LC2 is being used, in the lists the format DATE_FORMAT_LC3 is being used and so forth. One has to go through the code to understand it.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

ae6dx
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Sat Dec 11, 2010 8:55 am

Re: Change Date format

Post by ae6dx » Mon Jun 18, 2012 4:55 am

Ok I guess I'm doing it wrong. I did the overrides but nothing changed. Does the fact they are K2 items and not Joomla articles make a difference?
Brad

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Change Date format

Post by infograf768 » Mon Jun 18, 2012 6:44 am

ae6dx wrote:Ok I guess I'm doing it wrong. I did the overrides but nothing changed. Does the fact they are K2 items and not Joomla articles make a difference?
It could. One would have to check the code used in K2 to display items to see which constants are used.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

mackdoyle
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Fri Aug 17, 2012 4:00 pm

Re: Change Date format

Post by mackdoyle » Sat Jan 05, 2013 10:26 pm

I am having the same issue.I am using Joomla 2.5.8 and I DO NOT have K2 installed.

The default international date format is displaying as such: TUESDAY, 18 DECEMBER 2012 17:00

I first created language/en-GB.override.ini and added DATE_FORMAT_LC2="l, d F Y" to override the default setting in language/en-GB.ini. That did nothing so I changed the value directly in the source file from DATE_FORMAT_LC2="l, d F Y H:i" to DATE_FORMAT_LC2="l, d F Y", removing the 'H:i'. But the hour (17:00) still displays on articles.

I am lost.

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28202
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Change Date format

Post by imanickam » Sun Jan 06, 2013 1:37 am

mackdoyle wrote:I first created language/en-GB.override.ini
The override file en-GB.override.ini has to be in the directory \language\overrides.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Change Date format

Post by infograf768 » Sun Jan 06, 2013 6:59 am

mackdoyle wrote:I am having the same issue.I am using Joomla 2.5.8 and I DO NOT have K2 installed.

The default international date format is displaying as such: TUESDAY, 18 DECEMBER 2012 17:00

I first created language/en-GB.override.ini and added DATE_FORMAT_LC2="l, d F Y" to override the default setting in language/en-GB.ini. That did nothing so I changed the value directly in the source file from DATE_FORMAT_LC2="l, d F Y H:i" to DATE_FORMAT_LC2="l, d F Y", removing the 'H:i'. But the hour (17:00) still displays on articles.

I am lost.
It may be that your template is using an override for the article display.
Also, use the Language Manager->Overrides to create the override in the right folder (choose site or admin for the language concerned)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

mackdoyle
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Fri Aug 17, 2012 4:00 pm

Re: Change Date format

Post by mackdoyle » Sun Jan 06, 2013 2:37 pm

imanickam wrote:
mackdoyle wrote:I first created language/en-GB.override.ini
The override file en-GB.override.ini has to be in the directory \language\overrides.
Thanks! That did it. Still strange that modifying the source file didn't do it, though. It must have been a cache issue that was cleared since I looked at it last.

mackdoyle
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Fri Aug 17, 2012 4:00 pm

Re: Change Date format

Post by mackdoyle » Sun Jan 06, 2013 2:45 pm

infograf768 wrote:
mackdoyle wrote:I am having the same issue.I am using Joomla 2.5.8 and I DO NOT have K2 installed.

The default international date format is displaying as such: TUESDAY, 18 DECEMBER 2012 17:00

I first created language/en-GB.override.ini and added DATE_FORMAT_LC2="l, d F Y" to override the default setting in language/en-GB.ini. That did nothing so I changed the value directly in the source file from DATE_FORMAT_LC2="l, d F Y H:i" to DATE_FORMAT_LC2="l, d F Y", removing the 'H:i'. But the hour (17:00) still displays on articles.

I am lost.
It may be that your template is using an override for the article display.
Also, use the Language Manager->Overrides to create the override in the right folder (choose site or admin for the language concerned)

Thanks Infograf. I had tried that before but now realize the the [value] radio button is checked by default in the search so searching for DATE_FORMAT was returning nothing. Once I switched it to search for the [Constant], it pulled right up.

Markstein
Joomla! Hero
Joomla! Hero
Posts: 2268
Joined: Sat Feb 09, 2008 8:27 am
Location: California, USA

Re: Change Date format

Post by Markstein » Sun Jan 06, 2013 6:58 pm

For additional information others can also read the following post:

http://forum.joomla.org/viewtopic.php?f ... e#p2952166

Mark

BobN_82
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Jan 22, 2014 11:23 pm

Re: Change Date format

Post by BobN_82 » Wed Jan 22, 2014 11:34 pm

Awesome. I used the information after upgrading my Joomla site from 1.5 to 2.5. I'm using the js_jamba template. After I upgraded with SPUpgrade, I installed the 2.5 js_jamba template from Joomlashack.

Using the Language Overrides, DATE_FORMAT_LC4 fixed my articles. DATE_FORMAT_LC3 fixed my blog layouts. I set both to "F j, Y" (with no quotes). Most of my users are American, so this is perfect. In the template code, it looks like it's using DATE_FORMAT_LC2, but changing that didn't do anything.

I didn't want to change any code that might break in the next upgrade. This forum saved me a boatload of time.

Bob
Last edited by imanickam on Thu Jan 23, 2014 5:42 am, edited 1 time in total.
Reason: Manual Signature removed


Locked

Return to “Language - Joomla! 2.5”