Index: openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl,v diff -u -r1.12.14.1 -r1.12.14.2 --- openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl 1 Oct 2013 08:36:53 -0000 1.12.14.1 +++ openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl 2 Oct 2013 08:56:26 -0000 1.12.14.2 @@ -102,14 +102,14 @@ set julian_date [dt_ansi_to_julian 1582 10 15 CE] } else { if {$era eq "BCE"} { - set year [expr -$year + 1] + set year [expr {-$year + 1}] } if {$month > 2} { set year_n $year set month_n [expr {$month + 1}] } else { - set year_n [expr {$year - 1}] + set year_n [expr {$year - 1}] set month_n [expr {$month + 13}] } @@ -232,7 +232,7 @@ Returns the weekday number of the first day for the given month/year } { # calendar widgets are expecting integers 1-7, so we must adjust - return [expr [clock format [clock scan $year-$month-01] -format %w] + 1] + return [expr {[clock format [clock scan $year-$month-01] -format %w] + 1}] } ad_proc -public dt_next_month { @@ -531,7 +531,7 @@ Input variables can be any strings that can be converted to times using clock scan. } { - return [expr [clock scan $end]-[clock scan $start]] + return [expr {[clock scan $end] - [clock scan $start]}] } ad_proc -private dt_trim_leading_zeros {