• Publicity: Public Only All

acs-calendar-2-procs.tcl

Library for calendar display widgets

Location:
packages/acs-datetime/tcl/acs-calendar-2-procs.tcl
Created:
2000-11-21
Author:
ron@arsdigita.com
CVS Identification:
$Id: acs-calendar-2-procs.tcl,v 1.46.2.3 2021/12/28 14:49:49 antoniop Exp $

Procedures in this file

Detailed information

dt_hour_diff (public, deprecated)

 dt_hour_diff -start_time start_time -end_time end_time
Deprecated. Invoking this procedure generates a warning.

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.

Switches:
-start_time (required)
-end_time (required)
See Also:
  • clock

Partial Call Graph (max 5 caller/called nodes):
%3 dt_widget_day dt_widget_day (public, deprecated) dt_hour_diff dt_hour_diff dt_widget_day->dt_hour_diff ad_log_deprecated ad_log_deprecated (public) dt_hour_diff->ad_log_deprecated

Testcases:
No testcase defined.

dt_midnight_p (public)

 dt_midnight_p time

Check if a time is midnight. This might be replaced by clock idioms in the future, but is currently the way we decide e.g. if an event is an all-day event.

Parameters:
time (required)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_dt_midnight_p dt_midnight_p (test acs-datetime) dt_midnight_p dt_midnight_p test_dt_midnight_p->dt_midnight_p dt_no_time_p dt_no_time_p (public) dt_no_time_p->dt_midnight_p

Testcases:
dt_midnight_p

dt_no_time_p (public)

 dt_no_time_p -start_time start_time -end_time end_time

This decides whether an item is without a time, which is also our definition of an all-day event.

Switches:
-start_time (required)
-end_time (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_dt_midnight_p dt_midnight_p (test acs-datetime) dt_no_time_p dt_no_time_p test_dt_midnight_p->dt_no_time_p dt_midnight_p dt_midnight_p (public) dt_no_time_p->dt_midnight_p dt_widget_list dt_widget_list (public, deprecated) dt_widget_list->dt_no_time_p

Testcases:
dt_midnight_p

dt_widget_day (public, deprecated)

 dt_widget_day [ -calendar_details calendar_details ] [ -date date ] \
    [ -hour_template hour_template ] [ -start_hour start_hour ] \
    [ -end_hour end_hour ] [ -show_nav show_nav ] \
    [ -prev_nav_template prev_nav_template ] \
    [ -next_nav_template next_nav_template ] \
    [ -master_bgcolor master_bgcolor ] \
    [ -header_bgcolor header_bgcolor ] \
    [ -header_text_color header_text_color ] \
    [ -header_text_size header_text_size ] \
    [ -calendar_width calendar_width ] [ -day_bgcolor day_bgcolor ] \
    [ -today_bgcolor today_bgcolor ] \
    [ -day_text_color day_text_color ] \
    [ -empty_bgcolor empty_bgcolor ] [ -overlap_p overlap_p ]
Deprecated. Invoking this procedure generates a warning.

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.

Switches:
-calendar_details (optional)
-date (optional)
-hour_template (optional, defaults to "$display_hour")
-start_hour (optional, defaults to "0")
-end_hour (optional, defaults to "23")
-show_nav (optional, defaults to "1")
-prev_nav_template (optional, defaults to "<a href="?date=[ns_urlencode $yesterday]"><img border="0" src="[dt_left_arrow]" alt="[_ acs-datetime.back_one_day]"></a>")
-next_nav_template (optional, defaults to "<a href="?date=[ns_urlencode $tomorrow]"><img border="0" src="[dt_right_arrow]" alt="[_ acs-datetime.forward_one_day]"></a>")
-master_bgcolor (optional, defaults to "black")
-header_bgcolor (optional, defaults to "black")
-header_text_color (optional, defaults to "white")
-header_text_size (optional, defaults to "+2")
-calendar_width (optional, defaults to "100%")
-day_bgcolor (optional, defaults to "#DDDDDD")
-today_bgcolor (optional, defaults to "yellow")
-day_text_color (optional, defaults to "white")
-empty_bgcolor (optional, defaults to "white")
-overlap_p (optional, defaults to "0")
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_log_deprecated ad_log_deprecated (public) db_1row db_1row (public) dt_hour_diff dt_hour_diff (public, deprecated) dt_sysdate dt_sysdate (public) dt_widget_day dt_widget_day dt_widget_day->_ dt_widget_day->ad_log_deprecated dt_widget_day->db_1row dt_widget_day->dt_hour_diff dt_widget_day->dt_sysdate

Testcases:
No testcase defined.

dt_widget_list (public, deprecated)

 dt_widget_list -calendar_details calendar_details \
    [ -item_template item_template ] [ -start_date start_date ] \
    [ -end_date end_date ] [ -order_by order_by ] \
    [ -url_template url_template ]
Deprecated. Invoking this procedure generates a warning.

create a listing widget for lists (ben) I would like to ask forgiveness from the coding gods for this proc. 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.

Switches:
-calendar_details (required)
-item_template (optional, defaults to "$item")
-start_date (optional)
-end_date (optional)
-order_by (optional)
-url_template (optional, defaults to "?order_by=$order_by")
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_log_deprecated ad_log_deprecated (public) dt_no_time_p dt_no_time_p (public) lc_time_fmt lc_time_fmt (public) util_AnsiDatetoPrettyDate util_AnsiDatetoPrettyDate (public, deprecated) dt_widget_list dt_widget_list dt_widget_list->_ dt_widget_list->ad_log_deprecated dt_widget_list->dt_no_time_p dt_widget_list->lc_time_fmt dt_widget_list->util_AnsiDatetoPrettyDate

Testcases:
No testcase defined.

dt_widget_week (public, deprecated)

 dt_widget_week [ -calendar_details calendar_details ] [ -date date ] \
    [ -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_template day_template ] \
    [ -day_header_size day_header_size ] \
    [ -day_header_bgcolor day_header_bgcolor ] \
    [ -calendar_width calendar_width ] [ -day_bgcolor day_bgcolor ] \
    [ -today_bgcolor today_bgcolor ] \
    [ -day_text_color day_text_color ] \
    [ -empty_bgcolor empty_bgcolor ] \
    [ -next_week_template next_week_template ] \
    [ -prev_week_template prev_week_template ] \
    [ -prev_next_links_in_title prev_next_links_in_title ] \
    [ -fill_all_days fill_all_days ]
Deprecated. Invoking this procedure generates a warning.

Returns a calendar for a specific week, with details supplied by Julian date. Defaults to this week. To specify details for the individual days (if large_calendar_p is 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. The variables in the templates are: - 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.

Switches:
-calendar_details (optional)
-date (optional)
-large_calendar_p (optional, defaults to "1")
-master_bgcolor (optional)
-header_bgcolor (optional)
-header_text_color (optional, defaults to "white")
-header_text_size (optional, defaults to "+2")
-day_template (optional, defaults to "<!--$julian-->$day")
-day_header_size (optional, defaults to "2")
-day_header_bgcolor (optional, defaults to "#666666")
-calendar_width (optional, defaults to "100%")
-day_bgcolor (optional, defaults to "#DCDCDC")
-today_bgcolor (optional, defaults to "#FFF8DC")
-day_text_color (optional, defaults to "white")
-empty_bgcolor (optional, defaults to "white")
-next_week_template (optional)
-prev_week_template (optional)
-prev_next_links_in_title (optional, defaults to "0")
-fill_all_days (optional, defaults to "0")
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) db_1row db_1row (public) dt_sysdate dt_sysdate (public) util_AnsiDatetoPrettyDate util_AnsiDatetoPrettyDate (public, deprecated) dt_widget_week dt_widget_week dt_widget_week->ad_log_deprecated dt_widget_week->db_1row dt_widget_week->dt_sysdate dt_widget_week->util_AnsiDatetoPrettyDate

Testcases:
No testcase defined.
[ show source ]