Calandar date format
-
outdoorxtreme1
Calandar date format
I need help changing the date format for the calendar event template. Currently it shows - 5 March 2006
I want it to be - 03/05/06
How do I do this. I tried changing some if the settings of the template with no luck.
I want it to be - 03/05/06
How do I do this. I tried changing some if the settings of the template with no luck.
Re: Calandar date format
you need to set the date_format parameter in the tag to %d/%m/%y
e.g.
{cms_module module="Calendar" date_format="%d/%m/%y"}
e.g.
{cms_module module="Calendar" date_format="%d/%m/%y"}
Greg
-
outdoorxtreme1
Re: Calandar date format
I tried this tag in my template and it didn't work.
{cms_module module="Calendar" date_format="%m/%d/%y" summaries=true display="upcominglist" table_id="cal-upcominglist" limit=3}
{cms_module module="Calendar" date_format="%m/%d/%y" summaries=true display="upcominglist" table_id="cal-upcominglist" limit=3}
-
iNSiPiD
Re: Calandar date format
I had the same issue since News was upgraded to v2. Neither the 'date_format' nor the 'more' attributes worked any more.
I seem to have resolved this somehow but it's not in the templates or the module call, which means I must have hacked it at some stage.
At the moment I have two different date formats for my News and Site Updates and th eonly difference in the templates is that one checks for 'formatpostdate' and the other for 'postdate'.
e.g.
Can someone "in the know" please provide the correct steps for altering the date format? I thought it was now done through the templates but am not sure what syntax to use.
I seem to have resolved this somehow but it's not in the templates or the module call, which means I must have hacked it at some stage.
At the moment I have two different date formats for my News and Site Updates and th eonly difference in the templates is that one checks for 'formatpostdate' and the other for 'postdate'.
e.g.
Code: Select all
{if $entry->formatpostdate}
<div class="NewsSummaryPostdate">
{$entry->formatpostdate}
</div>
{/if}-
iNSiPiD
Re: Calandar date format
Helpful as ever, Patricia. That's exactly the answer we needed.
It would be nice to know what other paramters can be defined using this syntax.
{$entry->postdate|date_format:"%d/%m/%y"}
It would be nice to know what other paramters can be defined using this syntax.
{$entry->postdate|date_format:"%d/%m/%y"}
-
iNSiPiD
Re: Calandar date format
Thanks again, Patricia. It's hard to know sometimes where the CMS stops and Smarty begins.
A case in point is Smarty's email tag which already handles various types of encryption. Why do we bother having a plugin that does the same thing but uses javascript to achive its goal. Seems silly. I could also mention the phpinfo module -- but i won't.
A case in point is Smarty's email tag which already handles various types of encryption. Why do we bother having a plugin that does the same thing but uses javascript to achive its goal. Seems silly. I could also mention the phpinfo module -- but i won't.
-
outdoorxtreme1
Re: Calandar date format
Wouldn't work for me this way but I found another way. In the template I moved:
{$month_names[$month_number]}
and
{$event.event_date_start|date_format:"%e"}
around in the template to get it to output how I wanted the date to look.
{$month_names[$month_number]}
and
{$event.event_date_start|date_format:"%e"}
around in the template to get it to output how I wanted the date to look.
-
iNSiPiD
Re: Calandar date format
Yep. Good input.
The Calendar module uses dates differently from the News module.
The Calendar module uses dates differently from the News module.
Re: Calandar date format
This support forum is by far THE BEST I've seen in my 20 years as consultant ! Even experts-exchange is far behind...
Fred
Re: Calandar date format
I'd like to... perhaps on Tips & Tricks or FAQ section... But I'm just a nOOb, and have no time at all... my wife already went mad yesterday about me & computers!
OK, I'm going to play Loto, so I'm rich and am forced to earn my money anymore
BTW, I'd like to see Calendar without installing it (cf a previous post) - can somebody post a link, just to see this Calendar ?
Fred
OK, I'm going to play Loto, so I'm rich and am forced to earn my money anymore
BTW, I'd like to see Calendar without installing it (cf a previous post) - can somebody post a link, just to see this Calendar ?
Fred
-
iNSiPiD
Re: Calandar date format
fredt,
To install, you only have to click Install in the Extensions->Modules screen and then add the tag to a page. It's very simple. The harder part is styling it the way you like with CSS.
Here's an example with no events in it.
http://d81314.i50.quadrahosting.com.au/events-calendar
To install, you only have to click Install in the Extensions->Modules screen and then add the tag to a page. It's very simple. The harder part is styling it the way you like with CSS.
Here's an example with no events in it.
http://d81314.i50.quadrahosting.com.au/events-calendar

