Can't get the right date format....

Support forum dedicated to GameNews game Joomla template perfect for gamers, game portal news and reviews with dedicated extensions for rating and video support
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
Mon Dec 15, 2014 9:17 pm
Reply with quote
Report this post
I have it specified as F j, Y but it displays F j Y (eg: December 13 2014) with no comma.

I have it showing as the com_content/article/default.php and the language file. Is there somewhere else it could be?

This is how it appears in the default.php:

Code: Select all
<time datetime="<?php echo JHtml::_('date', $this->item->modified, JText::_('F j, Y')); ?>">


In the language file eng-gb.ini:

Code: Select all
DATE_FORMAT_LC="F j, Y"
DATE_FORMAT_LC1="F j, Y"
DATE_FORMAT_LC2="F j, Y"
DATE_FORMAT_LC3="F j, Y"
DATE_FORMAT_LC4="F j, Y"
DATE_FORMAT_JS1="F j, Y"


Any ideas? Thank you!
User avatar
Junior Boarder

GK User
Tue Dec 16, 2014 5:25 pm
Reply with quote
Report this post
Could you please post an url to your site - to a particular article where this problem can be seen?
User avatar
Moderator

GK User
Tue Dec 16, 2014 5:47 pm
Reply with quote
Report this post
sure, it's currently http://newsite.intlgymnast.com

Thanks!
User avatar
Junior Boarder

GK User
Tue Dec 16, 2014 6:24 pm
Reply with quote
Report this post
From what I see, on the homepage it displays correctly.
User avatar
Moderator

GK User
Tue Dec 16, 2014 6:29 pm
Reply with quote
Report this post
From what I see the problem is within single Joomla article.
You were close to the problem source:
templates/gk_gamenews/html/com_content/article/default.php
file is the right one to edit,
Code: Select all
      <li class="modified">
            <time datetime="<?php echo JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')); ?>" itemprop="dateModified">
               <?php echo JHtml::_('date', $this->item->modified, JText::_('d M Y h:i')); ?>
            </time>
         </li>

this is correct part, but the line you need to edit is:
Code: Select all
<?php echo JHtml::_('date', $this->item->modified, JText::_('d M Y h:i')); ?>

- the part which actually displays the date not one that generates time html tag.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.