Changing date format D.M.Y to M.D.Y in K2 blog view

GK User
Fri Nov 28, 2014 7:30 am
I have Americanized the date format everywhere I found it but I am unable to find the code for the blog view where K2 articles look like this page: http://demo.gavick.com/joomla25/writer/ ... /home/blog

shot.gif
User avatar
Senior Boarder

GK User
Fri Nov 28, 2014 9:29 am
Hi.
yes yes..we all know where is a difference. It's residuum after we decide to focus on EU markets.
You have to edit one file, I promise nothing scary....
templates\gk_writer\html\com_k2\templates\default\item.php

line 137: <?php echo JHTML::_('date', $this->item->created, 'l, j F Y'); ?>
this uses default PHP data rules, have fun.

Y- is year
User avatar
Platinum Boarder

GK User
Fri Nov 28, 2014 8:26 pm
Oscar E wrote:Hi.
yes yes..we all know where is a difference. It's residuum after we decide to focus on EU markets.
You have to edit one file, I promise nothing scary....
templates\gk_writer\html\com_k2\templates\default\item.php

line 137: <?php echo JHTML::_('date', $this->item->created, 'l, j F Y'); ?>
this uses default PHP data rules, have fun.

Y- is year


Hi Oscar,

I have already modified this line to read:
Code: Select all
php echo JHTML::_('date', $this->item->created, 'F j, Y'); ?>
Since there is no textual representation of the date then I think we are talking about two different code segments.

Please refer to my pic. You can also view my live page here for reference: http://www.hypereye.com/index.php/home/blogview

Thanks!
User avatar
Senior Boarder

GK User
Sun Nov 30, 2014 9:49 am
Upsss I missed blog view with article view. So sorry. :mrgreen: .
Please check those:
templates\gk_writer\html\com_content\category\blog_item.php (FOR ARTICLES ONLY)
and
templates\gk_writer\html\com_k2\templates\default\latest_item.php (FOR K2 ITEMS ONLY)
templates\gk_writer\html\com_k2\templates\default\category_item.php (FOR K2 ITEMS ONLY)
and find in each "<time datetime" phrase. And
from
<?php echo JHTML::_('date', $this->item->created, JText::_('j.m.Y')); ?>
to
<?php echo JHTML::_('date', $this->item->created, JText::_('Y.m.j')); ?>
User avatar
Platinum Boarder


cron