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.

eZ debug

Timing: Jan 18 2025 19:39:17
Script start
Timing: Jan 18 2025 19:39:17
Module start 'layout'
Timing: Jan 18 2025 19:39:17
Module start 'content'
Timing: Jan 18 2025 19:39:17
Module end 'content'
Timing: Jan 18 2025 19:39:17
Script end

Main resources:

Total runtime0.7166 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.0234152.6250
Module start 'layout' 0.00540.0036 741.648439.4453
Module start 'content' 0.00900.7065 781.0938550.0391
Module end 'content' 0.71550.0011 1,331.132812.1719
Script end 0.7166  1,343.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4321160.0002
Check MTime0.00130.1831160.0001
Mysql Total
Database connection0.00120.162910.0012
Mysqli_queries0.661892.3473570.0116
Looping result0.00060.0807550.0000
Template Total0.681795.120.3409
Template load0.00230.316520.0011
Template processing0.679494.812520.3397
Template load and register function0.00010.020210.0001
states
state_id_array0.00080.114010.0008
state_identifier_array0.00100.141120.0005
Override
Cache load0.00200.2740360.0001
Sytem overhead
Fetch class attribute can translate value0.00070.098820.0004
Fetch class attribute name0.00130.183350.0003
XML
Image XML parsing0.00120.161720.0006
class_abstraction
Instantiating content class attribute0.00000.001860.0000
General
dbfile0.00090.1195230.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs