Page 1 of 1

calendar help needed: time format and layout changes

Posted: Mon Jul 24, 2006 5:19 pm
by lleighh
I set up cmsms for a client recently.  It has the calendar module ( http://www.mwbecoordinators.org/index.p ... t_calendar ) but the time format is in international (aka military) time.  How can I change this? 

They also want the dates listed bullet fashion instead of in a calendar grid. Can this be done?

Although I don't mind altering php, keep in mind I am not a coder ... just a web designer who knows HTML and tinkers with code sometimes.

Re: calendar help needed: time format and layout changes

Posted: Tue Apr 03, 2007 5:11 pm
by carasmo
What is the solution to this?

Re: calendar help needed: time format and layout changes

Posted: Tue Apr 03, 2007 5:21 pm
by calguy1000
there are some modifications in the calendar module svn to use a twelve hour clock.....

not sure about the bullet list though. 

Re: calendar help needed: time format and layout changes

Posted: Tue Apr 03, 2007 5:31 pm
by reidjazz
The twelive-hour clock setting is for the pulldowns in the ADMIN area, not the html that gets generated via PHP.

What I had to do (and you may have to as well) is to replace the 24-hour php setting '%H' (which is in the event template of the calendar module by default) with '%I' (php setting for 12-hour time). I also added '%p' after the '%M' (minutes setting) to display 'am' or 'pm' automatically as appropriate.

For a complete detailed manual of php's strftime, go to http://us3.php.net/manual/en/function.strftime.php

reidjazz

Re: calendar help needed: time format and layout changes

Posted: Tue Apr 03, 2007 6:14 pm
by carasmo
Yeah! Thank you!

Re: calendar help needed: time format and layout changes

Posted: Tue Apr 03, 2007 11:28 pm
by heatherfeuer
I had to do the same thing with my templates.  I haven't had to try it, but I suspect that one could use the calendar stylesheet to format a bulleted date list in columnar fashion that should work with the calendar template with only minimal changes to the php code.  The only part of the code you shouldn't mess with is the looping parts to set the days and dates.

What helped me when I was working with the calendar module was to pull out the templates and set them up in my favorite text editor formatted as much as possible to understand the flow.  Once I was able to separate the code that's tied to the stylesheet from the code loops that calculate the dates and days, it was fairly easy to make the modifications I needed.