View Single Post
Old 03-22-2004, 10:20 PM   #1
jerrywin5
Orange Mole
 
Join Date: Mar 2004
Posts: 48
Format modified date for search results

Just getting going with PHPDig. It is great. I have a few questions to ask and I'll start with this one.

How can I format the date that is displayed in the search results via <phpdig:update_date/> so that it displays a format such as Mar 22, 2004?

In includes/config.php I see:
PHP Code:
define('PHPDIG_DATE_FORMAT','\1-\2-\3');   // Date format for last update 
but this modifies the order of the display rather than the format. In libs/search_function.php I also see
PHP Code:
'update_date' => ereg_replace('^([0-9]{4})([0-9]{2})([0-9]{2}).*',PHPDIG_DATE_FORMAT,$content['last_modified']), 
but haven’t delved into regular expressions yet so am lost. Any help would be appreciated.

Thanks,
Jerry
jerrywin5 is offline   Reply With Quote