Page 1 of 1
News module and Blank of the month module
Posted: Tue Apr 03, 2007 6:54 pm
by js2006
Hi there,
I'm a newbie here, just wondering, is it possible to change the date format from 24h to 12h in the news module and blank of the month module for the following: post date, start date, end date etc?
Thanks,
Re: News module and Blank of the month module
Posted: Fri Apr 06, 2007 8:55 pm
by skypanther
From the BOTM help page (in the admin panel, modules page):
dateformat="%b %d, %Y" - Format to display the article's post date with. This is based on the strftime function and can be used in your template with $entry->formatpostdate. It defaults to %x, which is the default date format for the server's locale.
So, where you put {cms_module module='BlankOfTheMonth'} instead use {cms_module module='BlankOfTheMonth' dateformat='your_format_string'}
To figure out what to put for your_format_string, you'll need to check out the PHP reference for the strftime() function. See
http://us.php.net/strftime
Since I mostly copied the code from the News module to create the BOTM module, I assume that same paramter works for News too. I don't recall adding it.
Tim