1

I have setup a calendar using the native calendar module tag. The date variable {date format="%F %Y"} renders as APRIL 2013. Shouldn't it be rendering as May 2013? The url points to /2013/05 as the last two segments. Any logic behind this that I missed?

Cheers

edited here is the template code:

{exp:channel:calendar channel="daily_posts"}

        <table class="calendarBG" border="0" cellpadding="6" cellspacing="1" summary="My Calendar">
            <tr class="calendarHeader">
                <th>
                    <div class="calendarMonthLinks"><a href="{previous_path='month/index'}">&lt;&lt;</a>
                    </div>
                </th>
                <th colspan="5">
                    <h2>{date format="%F %Y"}</h2>
                 </th>
                <th>
                    <div class="calendarMonthLinks">
                        <a class="calendarMonthLinks" href="{next_path='month/index'}">&gt;&gt;</a>
                    </div>
                </th>
            </tr>
            <tr>
            {calendar_heading}
            <th class="calendarDayHeading">{lang:weekday_long}</th>
            {/calendar_heading}
            </tr>
            {calendar_rows}
                {row_start}<tr>{/row_start}
                {if entries}
                    <td class='{switch}' align='center'>
                        {entries}
                            <a href="/story/{entry_id}">
                                <span class="date">{entry_date format="%j %M %d"}</span>
                                <span class="day">{day_number}</span>
                                <img src="/assets/img/painting-nails.jpg" alt="">
                            </a>
                        {/entries}
                    </td>
                {/if}
                {if not_entries}
                    <td class='{switch}' align='center'>{day_number}</td>
                {/if}
                {if blank}
                    <td class='calendarBlank'>{day_number}</td>
                {/if}
                {row_end}</tr>{/row_end}
            {/calendar_rows}
         </table>
    {/exp:channel:calendar}
  • Can you post some or all of your template so we can see a bit more detail? It sounds like it SHOULD be May since the date variable is supposed to be today's date, but without seeing the template it's a bit hard to help troubleshoot. – Jean St-Amand May 7 '13 at 14:39
  • Out of interest, what do you get if you try the url 2013/05/01 ? – foamcow May 7 '13 at 17:13
1

When testing the site on a dev server the month displayed correctly. So I assume the issue was related to me local setup.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.