summaryrefslogtreecommitdiffstats
path: root/library/clock.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/clock.tcl')
-rwxr-xr-xlibrary/clock.tcl4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index 231f1ae..535a67d 100755
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -4449,6 +4449,10 @@ proc ::tcl::clock::AddMonths { months clockval timezone changeover } {
proc ::tcl::clock::AddWeekDays { days clockval timezone changeover } {
+ if {$days == 0} {
+ return $clockval
+ }
+
set day [format $clockval -format %u]
set weeks [expr {$days / 5}]