Calendar shows wrong week numbers
- Status
- Closed
- Subject
- Calendar shows wrong week numbers
- Category
- Error
- Feature
- Calendar
- Resolution status
- New
- Submitted by
- Atticus0307
- Lastmod by
- Landry Bitege
- Rating
- Description
This issue was reported here:
http://tikiwiki.org/tiki-view_forum_thread.php?comments_parentId=31232&topics_offset=2&topics_sort_mode=lastPost_desc&forumId=4
Here in Germany, and most likely in other parts of the world as well, we use an ISO based week numbering system.
The Calendar display the week starting Monday, January 5th 2009 as week 1, while in fact, as least here, week 1 starts on December 29th.
TW seems to use Date.getWeekOfYear() to get the week number. That must be considered a bug, since that doesn't take locales into account.
Instead, TW should use strftime with %U, %V or %W, depending on the locale or depending on settings.This is backed by PHP "bugs" 19719 and 14422 for example, which were identified as not being bugs at all. The docs of Date are not very clear on what getWeekOfYear() really returns. Both bug entries show how to determine the week number correctly.
- Solution
Use strftime with %U, %V or %W, depending on the locale or depending on settings.
It would be nice to have a configuration somewhere in Admin Calendar for this.- Workaround
- Importance
- 4
- Priority
- 20
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 2212
- Created
- Tuesday 09 December, 2008 18:08:59 UTC
by Unknown - LastModif
- Tuesday 14 April, 2026 21:09:22 UTC