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 -r1.11 -r1.12 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 18 Sep 2002 21:03:59 -0000 1.11 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 7 Nov 2002 08:41:33 -0000 1.12 @@ -42,6 +42,11 @@ Julian date of the day, and the value is a string (possibly with HTML formatting) that represents the details. } { + if {[string equal $days_of_week "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"]} { + set days_of_week [list [_ acs-datetime.Sunday] [_ acs-datetime.Monday] [_ acs-datetime.Tuesday] [_ acs-datetime.Wednesday] [_ acs-datetime.Thursday] [_ acs-datetime.Friday] [_ acs-datetime.Saturday]] + } + + dt_get_info $date set today_date [dt_sysdate] @@ -226,6 +231,10 @@ } { Returns a small calendar for a specific month. Defaults to this month. } { + if {[string equal $days_of_week "S M T W T F S"]} { + set days_of_week "[_ acs-datetime.S_M_T_W_T_F_S]" + } + return [dt_widget_month \ -calendar_details $calendar_details \ -date $date \ @@ -270,6 +279,10 @@ Returns a calendar for a specific month, with details supplied by Julian date. Defaults to this month. } { + if {[string equal $days_of_week "S M T W T F S"]} { + set days_of_week "[_ acs-datetime.S_M_T_W_T_F_S]" + } + set output "" dt_get_info $date @@ -319,6 +332,10 @@ date. Defaults to this month. Data in calendar_details will be ignored. } { + if {[string equal $days_of_week "S M T W T F S"]} { + set days_of_week "[_ acs-datetime.S_M_T_W_T_F_S]" + } + if { $width < 1 || $width > 12 } { return "Width must be between 1 and 12" } @@ -372,6 +389,10 @@ Returns a calendar year of small calendars for the year of the passed in date. Defaults to this year. } { + if {[string equal $days_of_week "S M T W T F S"]} { + set days_of_week "[_ acs-datetime.lt_S_M_T_W_T_F_S________]" + } + dt_get_info $date return [dt_widget_year \ @@ -428,7 +449,15 @@ # ben: taking out year for now, since it doesn't work foreach viewname {list day week month} { - set text [string toupper $viewname 0] + set text [string toupper $viewname 0] + ns_log bug "STC: $text" + switch -exact -- $text { + List {set text "[_ acs-datetime.List]"} + Day {set text "[_ acs-datetime.Day]"} + Week {set text "[_ acs-datetime.Week]"} + Month {set text "[_ acs-datetime.Month]"} + } + if { $viewname == $view } { # current view append result " @@ -663,8 +692,9 @@ " - set days_of_week [list S M T W T F S] + set days_of_week "[_ acs-datetime.S_M_T_W_T_F_S]" + foreach day_of_week $days_of_week { append output "$day_of_week\n" } @@ -750,17 +780,17 @@ " if { $view == "day" && [dt_sysdate] == $date } { - append output "Today" + append output "[_ acs-datetime.Today]" } else { append output " - Today " + [_ acs-datetime.Today] " } append output " - is [dt_ansi_to_pretty] + [_ acs-datetime.is] [dt_ansi_to_pretty]
-
Date as YYYYMMDD +
[_ acs-datetime.Date_as] YYYYMMDD "