Calendar week numbers

Author Message

Elena Ivanova

Thursday 03 January 2008 12:28:03 pm

Hello,

I have a calendar tool in the right toolbar with show_week=true() in order to view week numbers.

Everything seemed ok until beginning of new year - calendar is not rendered well - it seems that week numbers are not calculated correctly for months January and February.

My calendar looks like below, the first column is for week number.

Su Mo Tu We Th Fr Sa
0 1 2 3 4 5
2 6
02 7 8 9 10 11 12
3 13
03 14 15 16 17 18 19
4 20
04 21 22 23 24 25 26
5 27
05 28 29 30 31

I tested it for January2007 and February2007 and the result was the same.

Thanks for your help.

André R.

Friday 04 January 2008 4:26:48 am

You use the plain install right? (not the website interface included in 3.9 and up, and not ezflow included in 4.0 and up).
If so, it seems that the template you need to look into is design/standard/templates/navigator/monthview.tpl
If there really is a bug there, you should report it in the issue tracker, preferably with a patch :)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Elena Ivanova

Friday 04 January 2008 5:30:53 am

Hi André,

Thanks for your quick answer.

I’m using eZ 3.9.2 with website interface as functionality (web edit toolbar) and my own pagelayout. In ezwebin extension there aren’t any calendar-related files, I think. My calendar tool uses two templates:

- design/standard/templates/toolbar/full/calendar.tpl
- design/standard/templates/navigator/monthview.tpl

with minor changes not reflecting any week number calculations.

In monthview.tpl there is a section: {section show=$show_week} where $week.key is displayed. I wonder if anybody knows how it is calculated?

Thanks,
Elena

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.