Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl,v diff -u -r1.46 -r1.46.2.1 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 24 Apr 2018 14:28:55 -0000 1.46 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 13 Dec 2019 16:07:41 -0000 1.46.2.1 @@ -10,7 +10,7 @@ @cvs-id $Id$ } -ad_proc dt_widget_week { +ad_proc -deprecated dt_widget_week { {-calendar_details ""} {-date ""} {-large_calendar_p 1} @@ -43,6 +43,17 @@ - day_template: julian,day,date,pretty_date - next_week_template: - prev_week_template: + + DEPRECATED: this proc uses hardcoded markup and is therefore + difficult to style. It is also not localized. Many of the date + operations happening here have now good tcl support through the + clock api, which would make this code probably faster and + certainly portable (Oracle query is missing). Future + reimplementations should leverage the templating system more. + + @see /doc/acs-templating/ + @see /doc/acs-lang/ + @see clock } { set today_date [dt_sysdate] @@ -135,7 +146,7 @@ -ad_proc dt_widget_day { +ad_proc -deprecated dt_widget_day { {-calendar_details ""} {-date ""} {-hour_template {$display_hour}} @@ -158,6 +169,15 @@ Returns a calendar for a specific day, with details supplied by hour. Defaults to today. + DEPRECATED: this proc uses hardcoded markup and is therefore + difficult to style. It is also not localized. Many of the date + operations happening here have now good tcl support through the + clock api, which would make this code probably faster. Future + reimplementations should leverage the templating system more. + + @see /doc/acs-templating/ + @see /doc/acs-lang/ + @see clock } { if {$date eq ""} { @@ -379,7 +399,7 @@ -ad_proc -public dt_widget_list { +ad_proc -deprecated dt_widget_list { {-calendar_details:required} {-item_template {$item}} {-start_date ""} @@ -393,6 +413,14 @@ Right now this is a big hack to make the schedule look a lot like the SloanSpace v1.0 display. Once we have thought this through a bit more, I will generalize this proc. I promise. Please forgive me. + + DEPRECATED: time is up Ben. This proc uses hardcoded markup and is + therefore difficult to style. It is also not fully + localized. Future reimplementations should leverage the templating + system more. + + @see /doc/acs-templating/ + @see /doc/acs-lang/ } { # Check for zero size if {[ns_set size $calendar_details] == 0} { @@ -501,10 +529,16 @@ # Additional Utility Procs # -ad_proc dt_midnight_p { +ad_proc -deprecated dt_midnight_p { time } { check if a time is midnight + + DEPRECATED: this is really something one should do leveraging + existing tcl capabilities. Plain clock idioms can do the same in a + more generic and reliable way. + + @see clock } { if {$time eq "00:00" || $time eq ""} { return 1 @@ -528,11 +562,17 @@ return 0 } -ad_proc dt_no_time_p { +ad_proc -deprecated dt_no_time_p { {-start_time:required} {-end_time:required} } { This decides whether an item is without a time + + DEPRECATED: in upstream code, this proc is used only in + dt_widget_list, also deprecated. It is also so specific, that + chances it can be useful in general are really slim. + + @see dt_widget_list } { # Compare times and make sure it's midnight on both if {[dt_midnight_p $start_time] && [dt_midnight_p $end_time]} { @@ -542,14 +582,20 @@ } } -ad_proc dt_hour_diff { +ad_proc -deprecated dt_hour_diff { {-start_time:required} {-end_time:required} } { 24-hour times input (23:00,02:00). This gives us the num of hours of difference, taking into account that if something goes until 5:01, it is one more hour long than if it goes until 5:00 + + DEPRECATED: this is really something one should do leveraging + existing tcl capabilities. Plain clock idioms can do the same in a + more generic and reliable way. + + @see clock } { set start_hour [string trimleft [string range $start_time 0 1] 0] set end_hour [string trimleft [string range $end_time 0 1] 0]