Index: openacs-4/packages/calendar/tcl/calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-procs.tcl,v diff -u -r1.39 -r1.39.2.1 --- openacs-4/packages/calendar/tcl/calendar-procs.tcl 28 Jun 2018 14:58:16 -0000 1.39 +++ openacs-4/packages/calendar/tcl/calendar-procs.tcl 1 Mar 2019 11:01:22 -0000 1.39.2.1 @@ -203,16 +203,15 @@ @creation-date 20-July-2003 } { set first_day_of_week [lc_get firstdayofweek] - set last_day_of_week [expr {[expr {$first_day_of_week + 6}] % 7}] + set last_day_of_week [expr {($first_day_of_week + 6) % 7}] if {$current_day == $today_julian_date} { set today_p t } else { set today_p f } set day_number [expr {$current_day - $first_julian_date_of_month +1}] - set weekday [expr {[expr {$current_day % 7}] + 1}] - set weekday [ad_decode $weekday 7 0 $weekday] + set weekday [expr {($current_day + 1) % 7}] set beginning_of_week_p f set end_of_week_p f