Change Date Format

Phoca Download - download manager
prhammer
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 09 Jan 2009, 01:31

Change Date Format

Post by prhammer »

I was wondering where the date format is set? Is it in a css file or someplace else?

In our display it shows:

File Name: filename.exe
File Size: 66.25 MB
Version: 2009.12.16
Date: 08. April 2009

I would like to be able to remove the "." after the day. Or, alternatively, not display a date at all. Any help in how either (or both) of these might be accomplished would be appreciated.

-ron
codejunkie
Phoca Professional
Phoca Professional
Posts: 167
Joined: 11 Apr 2009, 01:30
Contact:

Re: Change Date Format

Post by codejunkie »

The date format appears to be hard coded into the default front end category template file -> components/com_phocadownload/views/category/tmpl/default.php at around line 114

Code: Select all

if ($valueDoc->date != '') {
	$details .= '<div>'.JText::_('Date').': '.JHTML::Date($valueDoc->date, "%d. %B %Y").'</div>';
}
You'll notice the date format ("%d. %B %Y") in the above code. You might try changing that string to one of these language strings.
  • "DATE_FORMAT_LC" should display as Monday, 13 April 2009
  • "DATE_FORMAT_LC1" should display as Monday, 13 April 2009
  • "DATE_FORMAT_LC2" should display as Monday, 13 April 2009 14:37
  • "DATE_FORMAT_LC3" should display as 13 April 2009
  • "DATE_FORMAT_LC4" should display as 13.04.09
You can find a few more language strings in the /language/en-GB/en-GB.ini at around line 7
Download Phoca Download Menu Module for listing Sections or Categories.
prhammer
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 09 Jan 2009, 01:31

Re: Change Date Format

Post by prhammer »

codejunkie wrote:The date format appears to be hard coded into the default front end category template file -> components/com_phocadownload/views/category/tmpl/default.php at around line 114

Code: Select all

if ($valueDoc->date != '') {
	$details .= '<div>'.JText::_('Date').': '.JHTML::Date($valueDoc->date, "%d. %B %Y").'</div>';
}
Thank you so much for your help finding that. For my needs, all I had to do was delete that period after %d

I actually wonder if that is a typo - or is that normal punctuation for the date format in some places?

Anyway - a very big thank you to codejunkie (sorry I was a little slow with it!)
Post Reply