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.
When navigating from one year to another, the navigation is somewhat bugged and doesn't always show the right week and dates.
Comments
Comment #1
Jochen Wendebaum CreditAttribution: Jochen Wendebaum commentedfixed
Comment #2
ressa CreditAttribution: ressa commentedThis still happens: If you click "previous week" from simplereservation/2/2010 -- you are taken to simplereservation/52/2009.
Also, the days are off by one: For example it says "Monday, 17.01.2010" when it really should be "Monday, 18.01.2010"
Comment #3
Jochen Wendebaum CreditAttribution: Jochen Wendebaum commentedI hoped that it was fixed... it worked here. Will be reviewed for 1.2
Comment #4
RoelG CreditAttribution: RoelG commentedWorkaround:
Edit the simplereservation.modules and look for:
and change it to:
This will flawlessy get you a week or a month back in time. When you hit the year-switch (so week 1 jan 2010) and press back the module will not understand it, so this is still a bug.
For me this workaround solves this big problem but create another small one.
Let me know if this is sufficient to solve you problem.
Comment #5
jlmelvin CreditAttribution: jlmelvin commentedComment #6
jlmelvin CreditAttribution: jlmelvin commentedif you instead change it to:
$config["week"] = $week;
$config["prev_week"] = $week - 1;
$config["prev_week_year"] = $year;
$config["prev_4week"] = $week - 4;
$config["prev_4week_year"] = $year;
if ($week <= 4) {
$config["prev_week"] = $week - 1;
$config["prev_week_year"] = $year;
$config["prev_4week"] = 52 - (4 - $week);
$config["prev_4week_year"] = $year - 1;
}
if ($week == 1) {
$config["prev_week"] = 52;
$config["prev_week_year"] = $year - 1;
}
the year change will work correctly
Comment #7
salvisChanged week view from date.module's "calendar weeks" to ISO weeks to fix this and other bugs.
Committed to the -dev version, give it up to 12h to be repackaged.