Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl,v diff -u -N -r1.26 -r1.27 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 19 Jun 2015 19:52:03 -0000 1.26 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 7 Aug 2017 23:47:55 -0000 1.27 @@ -74,23 +74,23 @@ if { $prev_next_links_in_title == 0 } { set title [subst { - + $month_heading \n}] } else { set title [subst { - - - - - \n}] @@ -99,13 +99,13 @@ # Write out the header and the days of the week append output [subst { -
$prev_month_url + + + + + - +
$prev_month_url $month_heading $next_month_url$next_month_url
+
$title - \n}] + \n}] foreach day_of_week $days_of_week { append output [subst { -
+ $day_of_week @@ -153,7 +153,7 @@ if { $fill_all_days == 0 } { set skip_day 1 } else { - append output "[subst $day_number_template] " + append output [subst $day_number_template] " " } } else { if {$julian_date == $today_julian_date} { @@ -164,7 +164,7 @@ set the_class "cal-month-day" } - append output "[subst $day_number_template] " + append output [subst {$day_number_template}] " " } if { (!$skip_day) && $large_calendar_p == 1 } { @@ -174,11 +174,8 @@ while { $calendar_day_index >= 0 } { set calendar_day [ns_set value $calendar_details $calendar_day_index] - ns_set delete $calendar_details $calendar_day_index - append output "$calendar_day" - set calendar_day_index [ns_set find $calendar_details $julian_date] } append output "" @@ -231,7 +228,7 @@ Returns a small calendar for a specific month. Defaults to this month. } { if {$days_of_week eq ""} { - set days_of_week "[_ acs-datetime.short_days_of_week]" + set days_of_week [_ acs-datetime.short_days_of_week] } return [dt_widget_month \ -calendar_details $calendar_details \ @@ -277,15 +274,15 @@ } { if {$days_of_week eq ""} { - set days_of_week "[_ acs-datetime.short_days_of_week]" + set days_of_week [_ acs-datetime.short_days_of_week] } set output "" dt_get_info $date append output " - + @@ -517,7 +514,7 @@ # Serve arrow link to prev year if it leads to legal date if {$prev_year_legal_p != 0} { append result [subst { - + left arrow }] } @@ -666,16 +663,16 @@ if {$view eq "month"} { # month view - append output " + append output [subst { -
[dt_widget_month_small -calendar_details $calendar_details -date $prev_month -days_of_week $days_of_week -large_calendar_p $large_calendar_p -master_bgcolor $master_bgcolor -header_bgcolor $header_bgcolor -header_text_color $header_text_color -header_text_size $header_text_size -day_number_template $day_number_template -day_header_size $day_header_size -day_header_bgcolor $day_header_bgcolor -calendar_width $calendar_width -day_bgcolor $day_bgcolor -day_text_color $day_text_color -empty_bgcolor $empty_bgcolor -next_month_template $next_month_template -prev_month_template $prev_month_template ]
- +
+ - " + }] set months_list [dt_month_names] set now [clock scan $date] - set curr_month [expr {[dt_trim_leading_zeros [clock format $now -format "%m"]] - 1}] + set curr_month [expr {[util::trim_leading_zeros [clock format $now -format "%m"]] - 1}] for {set i 0} {$i < 12} {incr i} { @@ -714,7 +711,7 @@ append output " -
+ \n" @@ -731,7 +728,7 @@ append output [subst { }] } @@ -808,7 +805,7 @@ } else { append output [subst { }] @@ -835,7 +832,6 @@
- $year + $year - + $day_number
-
@@ -854,15 +850,15 @@

- -
+ +
Date as YYYYMMDD - +
}] foreach var $list_of_vars { - append output "" + append output "" } append output " @@ -918,9 +914,9 @@ # get year, month, day set date_list [dt_ansi_to_list $the_date] - set year [dt_trim_leading_zeros [lindex $date_list 0]] - set month [dt_trim_leading_zeros [lindex $date_list 1]] - set day [dt_trim_leading_zeros [lindex $date_list 2]] + set year [util::trim_leading_zeros [lindex $date_list 0]] + set month [util::trim_leading_zeros [lindex $date_list 1]] + set day [util::trim_leading_zeros [lindex $date_list 2]] # We put all the data into dt_info_set and return it later set dt_info_set [ns_set create] @@ -974,3 +970,9 @@ ns_set free $dt_info_set } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: