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.31.2.6 -r1.31.2.7 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 23 Mar 2023 13:24:44 -0000 1.31.2.6 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 23 Mar 2023 16:14:43 -0000 1.31.2.7 @@ -9,7 +9,7 @@ @cvs-id $Id$ } -ad_proc dt_widget_month { +ad_proc -deprecated dt_widget_month { {-calendar_details ""} {-date ""} {-days_of_week ""} @@ -39,6 +39,12 @@ set) put data in an ns_set calendar_details. The key is the Julian date of the day, and the value is a string (possibly with HTML formatting) that represents the details. + + DEPRECATED: modern HTML5 feature make this widget less + relevant. It is also cumbersome to style and localize. + + @see template::widget::h5time + @see template::widget::h5date } { if {$days_of_week eq ""} { set days_of_week "[_ acs-datetime.days_of_week]" @@ -206,7 +212,7 @@ return [concat $output "\n"] } -ad_proc dt_widget_month_small { +ad_proc -deprecated dt_widget_month_small { {-calendar_details ""} {-date ""} {-days_of_week ""} @@ -225,6 +231,12 @@ {-next_month_template ""} {-prev_month_template ""} } { + DEPRECATED: modern HTML5 feature make this widget less + relevant. It is also cumbersome to style and localize. + + @see template::widget::h5time + @see template::widget::h5date + @return a small calendar for a specific month. Defaults to this month. } { if {$days_of_week eq ""} { @@ -250,7 +262,7 @@ -prev_month_template $prev_month_template ] } -ad_proc dt_widget_month_centered { +ad_proc -deprecated dt_widget_month_centered { {-calendar_details ""} {-date ""} {-days_of_week ""} @@ -269,6 +281,12 @@ {-next_month_template ""} {-prev_month_template ""} } { + DEPRECATED: modern HTML5 feature make this widget less + relevant. It is also cumbersome to style and localize. + + @see template::widget::h5time + @see template::widget::h5date + @return a calendar for a specific month, with details supplied by Julian date. Defaults to this month. } { Index: openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl,v diff -u -r1.19.2.7 -r1.19.2.8 --- openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl 27 Jan 2023 14:21:48 -0000 1.19.2.7 +++ openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl 23 Mar 2023 16:14:43 -0000 1.19.2.8 @@ -244,7 +244,7 @@ } } -ad_proc -public dt_widget_datetime { +ad_proc -deprecated dt_widget_datetime { {-show_date 1} {-date_time_sep " "} {-use_am_pm 0} @@ -271,6 +271,12 @@ be hidden if not needed to satisfy the current granularity level. Values default to 1 for MM/DD and 0 for HH/MI/SS/AM if not found in the input string or if below the granularity threshold. + + DEPRECATED: modern HTML5 feature make this widget less + relevant. It is also cumbersome to style and localize. + + @see template::widget::h5time + @see template::widget::h5date } { set to_precision [dt_precision $granularity] @@ -370,10 +376,16 @@ return $input } -ad_proc -public dt_widget_month_names { +ad_proc -deprecated dt_widget_month_names { name {selected_month 0} } { + DEPRECATED: modern HTML5 feature make this widget less + relevant. It is also cumbersome to style and localize. + + @see template::widget::h5time + @see template::widget::h5date + @return a select widget for months of the year. } { if {$selected_month eq ""} {set selected_month 0} @@ -389,14 +401,22 @@ return "\n" } -ad_proc -public dt_widget_numeric_range { +ad_proc -deprecated dt_widget_numeric_range { name begin end {default ""} {interval 1} {with_leading_zeros 0} } { + DEPRECATED: this widget would be difficult to style and is + actually simpler to inline such an idiom in one's tcl or adp + code. The templating system also provides select widgets that take + care of validating the selection. + + @see template::widget::select + @see template::widget::multiselect + @return an HTML select widget for a numeric range } { if {$with_leading_zeros} { @@ -418,7 +438,7 @@ return "" } -ad_proc -public dt_widget_maybe_range { +ad_proc -deprecated dt_widget_maybe_range { {-hide t} {-hidden_value "00"} {-default ""} @@ -432,6 +452,11 @@ {with_leading_zeros 0} {hidden_value "00"} } { + DEPRECATED: this proc was only used inside of now deprecated + dt_widget_datetime. + + @see dt_widget_datetime + @return form numeric range, or hidden_value if ask_for_value is false. } { if {!$ask_for_value} { Index: openacs-4/packages/acs-datetime/www/doc/design.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/www/doc/design.adp,v diff -u -r1.4.2.4 -r1.4.2.5 --- openacs-4/packages/acs-datetime/www/doc/design.adp 23 Mar 2023 13:24:44 -0000 1.4.2.4 +++ openacs-4/packages/acs-datetime/www/doc/design.adp 23 Mar 2023 16:14:43 -0000 1.4.2.5 @@ -19,10 +19,7 @@ date/time information as input and return date/time strings to the caller. Rather than standardize on a low-level representation of time (like seconds since 00:00:00 UTC, January 1 1970) all of these -procedures accept general date specifications. For example, the -default date for dt_widget_datetime can be specified -as "2001-01-05", "2000-01-05 09:57 pm", -"2000-01-05 21:57", etc. Internally these are parsed by +procedures accept general date specifications. Internally dates are parsed by the standard Tcl procedure clock scan for processing and then converted back to a formatted string for output. This makes it easy to pass dates between the Tcl layer and the @@ -62,35 +59,6 @@ interval by comparing start and end times and determining if they represent a positive, empty, or negative time range -

Date and Time widgets

-

See examples.

-
    -
  1. -dt_widget_datetime generate HTML select widgets of -varying granularity for collecting date and time information from -users.
  2. -dt_widget_month generates an HTML select widget -for months of the year
  3. -dt_widget_numeric_range generates an HTML select -widget for general numeric ranges
  4. -
-

Calendar widgets

-

See examples.

-

Each of the following allow the programmer to supply calendar -details in an ns_set keyed on Julian date and returns -an HTML table.

-
    -
  1. -dt_widget_month generates a basic monthly -calendar
  2. -dt_widget_month_small generates a small monthly -calendar
  3. -dt_widget_centered generates small monthly -calendars centered in a given month (previous, current, next)
  4. -dt_widget_year generates a yearly calendar -(composed of small monthly calendars) given the starting month as a -date
  5. -

XII. Future Improvements/Areas of Likely Change

Many of the calendar widgets generate extensive HTML from within Tcl procedures. This will eventually be converted to a Index: openacs-4/packages/acs-datetime/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/www/doc/design.html,v diff -u -r1.3.2.3 -r1.3.2.4 --- openacs-4/packages/acs-datetime/www/doc/design.html 23 Mar 2023 13:24:44 -0000 1.3.2.3 +++ openacs-4/packages/acs-datetime/www/doc/design.html 23 Mar 2023 16:14:43 -0000 1.3.2.4 @@ -27,16 +27,14 @@ services like Julian date conversions.

Most the procedures defined within the ACS DateTime service take -date/time information as input and return date/time strings -to the caller. Rather than standardize on a low-level representation -of time (like seconds since 00:00:00 UTC, January 1 1970) all of these -procedures accept general date specifications. For example, the -default date for dt_widget_datetime can be specified as -"2001-01-05", "2000-01-05 09:57 pm", "2000-01-05 21:57", etc. -Internally these are parsed by the standard Tcl procedure clock -scan for processing and then converted back to a formatted -string for output. This makes it easy to pass dates between the Tcl -layer and the database. +date/time information as input and return date/time strings to the +caller. Rather than standardize on a low-level representation of time +(like seconds since 00:00:00 UTC, January 1 1970) all of these +procedures accept general date specifications. Internally dates are +parsed by the standard Tcl procedure clock scan for +processing and then converted back to a formatted string for output. +This makes it easy to pass dates between the Tcl layer and the +database.

III. Historical Considerations

@@ -80,37 +78,6 @@ time range -

Date and Time widgets

- -

See examples. - -

    -
  1. dt_widget_datetime generate HTML select widgets of varying granularity for -collecting date and time information from users. -
  2. dt_widget_month generates an HTML select widget for -months of the year -
  3. dt_widget_numeric_range generates an HTML select -widget for general numeric ranges - -
- -

Calendar widgets

- -

See examples.

- -

Each of the following allow the programmer to supply calendar -details in an ns_set keyed on Julian date and returns an -HTML table.

- -
    -
  1. dt_widget_month generates a basic monthly calendar -
  2. dt_widget_month_small generates a small monthly calendar -
  3. dt_widget_centered generates small monthly calendars -centered in a given month (previous, current, next) -
  4. dt_widget_year generates a yearly calendar (composed of small monthly calendars) -given the starting month as a date -
-

XII. Future Improvements/Areas of Likely Change

Many of the calendar widgets generate extensive HTML from within Fisheye: Tag 1.6.4.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-datetime/www/doc/examples/calendar-widgets.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4.2.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-datetime/www/doc/examples/calendar-widgets.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.7.4.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-datetime/www/doc/examples/datetime-widgets.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4.2.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-datetime/www/doc/examples/datetime-widgets.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-datetime/www/doc/examples/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/www/doc/examples/index.adp,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/acs-datetime/www/doc/examples/index.adp 23 Mar 2023 13:24:44 -0000 1.5.2.1 +++ openacs-4/packages/acs-datetime/www/doc/examples/index.adp 23 Mar 2023 16:14:43 -0000 1.5.2.2 @@ -10,10 +10,6 @@