Change format of date?

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Jun 07, 2013 10:25 am
Reply with quote
Report this post
Hi,
could I should the date format of the articles in the StartUp template in this format also?

18 SEP
2013

Instead of only:
18 SEP

Thx
User avatar
Fresh Boarder

GK User
Fri Jun 07, 2013 3:52 pm
Reply with quote
Report this post
Hi,
Check this file: gk_startup\html\com_content\article\default.php
Line 99:
Code: Select all
<?php echo JHtml::_('date', $this->item->created, JText::_('d M')); ?>


Add "Y" after M
Code: Select all
<?php echo JHtml::_('date', $this->item->created, JText::_('d M Y')); ?>


You will get Year like me see below
User avatar
Platinum Boarder

GK User
Fri Jun 07, 2013 9:27 pm
Reply with quote
Report this post
Great - thanks! :)
User avatar
Fresh Boarder

GK User
Sat Jun 08, 2013 9:27 am
Reply with quote
Report this post
and using few lines more you can get this effect
date.png

date-2.png


of course you had to add shadow, more padding inside etc. etc... maybe next time (next topic) if you like
User avatar
Platinum Boarder

GK User
Sun Jun 09, 2013 7:44 am
Reply with quote
Report this post
Thank you, that´s fine for me. :)
User avatar
Fresh Boarder

GK User
Wed Jun 26, 2013 4:14 pm
Reply with quote
Report this post
Hi,
coming back to the issue of showing the date like "May 23 2013" instead of "May 23".

Based on your initial answer, I changed the code, the date is shown now including the year in ARTICLES.


However - I generally switched of "Show date created" in articles, as I want to show it only in the News section.

So I went to the my menu "News" and there, I set "show date created" to YES for articles, shown.


The point is - here again, all dates are shown without the Year. Where do I have to change the date code for this?

Many thanks.
User avatar
Fresh Boarder

GK User
Sat Jun 29, 2013 10:49 am
Reply with quote
Report this post
Just do the same for this file: gk_startup\html\com_content\category\blog_item.php
User avatar
Platinum Boarder

GK User
Tue Jul 02, 2013 10:34 am
Reply with quote
Report this post
Don Lee wrote:Just do the same for this file: gk_startup\html\com_content\category\blog_item.php


Thank you, that worked!

Additionally, I also had to change the date format in featured\default_item.php to get it the way I want in featured articles on the homepage as well...
User avatar
Fresh Boarder

GK User
Tue Jul 02, 2013 12:05 pm
Reply with quote
Report this post
Yeah you got it right. Well done!
User avatar
Platinum Boarder


cron