Page 1 of 1

CGCalendar French Day Problem in Upcoming list template

Posted: Wed Apr 25, 2012 10:34 pm
by joecannes
Hi all,

I am working on a french site and using CGCalendar. This is the code I using for the upcoming list template:

Code: Select all

<div class="calendar-event">
<h2>Date de l'événement :</h2>
{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{assign var=day_number value=$event.event_date_start|date_format:"%w"}
{assign var=end_day_number value=$event.event_date_end|date_format:"%w"}

{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 1}
  <p class="calendar-date-from">le {$day_names[$day_number]}  {$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y"}</p>
{if $event.event_date_start|date_format:"%d%m%Y" == $event.event_date_end|date_format:"%d%m%Y"}
  <p class="calendar-date-from">le {$day_names[$day_number]} {$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y"}</p>
  <p class="calendar-date-from">le {$day_names[$day_number]} {$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y"} {$} 
  le {$day_names[$end_day_number]}{$event.event_date_end|date_format:"%e"} {$month_names[$end_month_number]} {$event.event_date_end|date_format:"%Y"}</p>
{if $event.event_details !="" && $event.event_details != "<br />"}
    <div class="calendar-details">
    	{eval var=$event.event_details}

{* Display custom fields
   There are two ways to address custom fields
   1) {$event.fields.fieldname}
   2) {foreach from=$event.fields key='fieldnamee' item='fieldvalue'}
        {$fieldname}: {$fieldvalue}
   You may want to use the former method with file upload fields.
<div class="calendar-fields">
  {foreach from=$event.fields key='fieldname' item='fieldvalue'}
      {$fieldname}: {$fieldvalue}<br/>
<div class="calendar-returnlink">{$return_link}</div>
and this is the code I use to call teh script on my page:

Code: Select all

{cms_module module="CGCalendar" display="upcominglist" upcominglisttemplate="upcoming-events-fr" category="Musée Bytown" detailpage="events" eventtemplate="event-detail-fr" first_day_of_week="-1"}
The problem is, my days are outputted as one day ahead. I get this results on page:

le Dimanche 19 Mai 2012 au le Mardi 21 Mai 2012

(or in english, Sunday, 19 May 19 2012 to Monday21 May 2012)

whenit should be

le Samedi Mai 2012 au le Lundi 21 Mai 2012

(or in english, Saturday, 19 May 19 2012 to Tuesday 21 May 2012)

i thought I could use the paramter "first_day_of_week", but that is for the calendar, not an upcoming list. ANy help on how I can get the days appearing right?