Index: modules/widget/calendar.tcl
==================================================================
--- modules/widget/calendar.tcl
+++ modules/widget/calendar.tcl
@@ -542,11 +542,14 @@
 	# Replace month/year and do any necessary substs
 	return [subst [string map [list %m $month %Y $year] $format]]
     }
 
     method numberofdays {month year} {
-	if {$month == 12} {set month 0; incr year}
+	if {$month > 11} {
+	    set month [expr {$month % 12}]
+	    incr year
+	}
 	clock format [clock scan "[incr month]/1/$year	1 day ago"] -format %d
     }
 
     method lcycle _list {
 	upvar $_list list

