Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am using calendar module 5.x-1.7. Apparently the "Week" view in calendar is still disabled because of the difficulty in getting ISO 8601 week numbers correct.
It occurred to me we can just query the database for this, no?
For example the sql function Week('2007-01-01') should return 0. I'd trust the DB logic more than I trust any 'new' code. Why can't we not re-invent the wheel and leverage existing code that's been tested to work?
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedThat won't work because it will give you the ISO week, not the calendar week, and the calendar week will be different depending on what day your week starts on. It is a very complicated problem.
This should be fixed in the 5.2 version, which is not quite ready for an official release. You can see that release if you look for 'other releases' on the project page. Try it in a test environment, or be prepared to update it as bugs are found and fixed.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.