• Publicity: Public Only All

acs-calendar-procs.tcl

Library for calendar display widgets

Location:
packages/acs-datetime/tcl/acs-calendar-procs.tcl
Created:
2000-11-21
Author:
ron@arsdigita.com
CVS Identification:
$Id: acs-calendar-procs.tcl,v 1.31.2.9 2023/03/23 17:11:19 antoniop Exp $

Procedures in this file

Detailed information

dt_get_info (public)

 dt_get_info [ -element element ] [ -dict ] [ the_date ]

Calculates various dates required by the dt_widget_month procedure. Defines, in the caller's environment, a whole set of variables needed for calendar display. Returns the following (example for the_date = 2000-12-08): julian_date_today 2451887 month December year 2000 first_julian_date 2451875 first_julian_date_of_month 2451880 num_days_in_month 31 last_julian_date_in_month 2451910 last_julian_date 2451916 first_day 26 first_day_of_month 6 last_day 31 next_month 2001-01-01 prev_month 2000-11-01 beginning_of_year 2000-01-01 days_in_last_month 30 next_month_name January prev_month_name November

Switches:
-element
(optional)
when set, the proc will return this date property only and will not set any variable in the caller scope. Trying to fetch a non-existing property will throw an error.
-dict
(boolean) (optional)
when set, the proc will return all properties as a dict and will not set any variable in the caller scope.
Parameters:
the_date (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_dt_get_info dt_get_info (test acs-datetime) dt_get_info dt_get_info test_dt_get_info->dt_get_info dt_ansi_to_julian dt_ansi_to_julian (public) dt_get_info->dt_ansi_to_julian dt_ansi_to_list dt_ansi_to_list (public) dt_get_info->dt_ansi_to_list dt_first_day_of_month dt_first_day_of_month (public) dt_get_info->dt_first_day_of_month dt_next_month dt_next_month (public) dt_get_info->dt_next_month dt_next_month_name dt_next_month_name (public) dt_get_info->dt_next_month_name dt_widget_calendar_navigation dt_widget_calendar_navigation (public, deprecated) dt_widget_calendar_navigation->dt_get_info dt_widget_calendar_year dt_widget_calendar_year (public, deprecated) dt_widget_calendar_year->dt_get_info dt_widget_month dt_widget_month (public, deprecated) dt_widget_month->dt_get_info dt_widget_month_centered dt_widget_month_centered (public, deprecated) dt_widget_month_centered->dt_get_info dt_widget_year dt_widget_year (public, deprecated) dt_widget_year->dt_get_info

Testcases:
dt_get_info

dt_widget_calendar_navigation (public, deprecated)

 dt_widget_calendar_navigation [ base_url ] [ view ] [ date ] \
    [ pass_in_vars ]
Deprecated. Invoking this procedure generates a warning.

This proc creates a mini calendar useful for navigating various calendar views. It takes a base url, which is the url to which this mini calendar will navigate. pass_in_vars, if defined, can be url variables to be set in base_url. They should be in the format returned by export_url_vars This proc will set 2 variables in that url's environment: the view and the date. Valid views are list, day, week, month, and year. (ben) for now I am disabling year, which doesn't work. The date must be formatted YYYY-MM-DD. DEPRECATED: this api is never used in upstream code. One historical usage was in the calendar package, that has its own caldar UI since many years. Having such widgets in the api makes it also difficult to style them.

Parameters:
base_url (optional)
view (defaults to "week")
date (optional)
pass_in_vars (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) dt_ansi_to_pretty dt_ansi_to_pretty (public) dt_get_info dt_get_info (public) dt_julian_to_ansi dt_julian_to_ansi (public) dt_month_names dt_month_names (public) dt_widget_calendar_navigation dt_widget_calendar_navigation dt_widget_calendar_navigation->ad_log_deprecated dt_widget_calendar_navigation->dt_ansi_to_pretty dt_widget_calendar_navigation->dt_get_info dt_widget_calendar_navigation->dt_julian_to_ansi dt_widget_calendar_navigation->dt_month_names

Testcases:
No testcase defined.

dt_widget_calendar_year (public, deprecated)

 dt_widget_calendar_year [ -calendar_details calendar_details ] \
    [ -date date ] [ -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 ] [ -width width ]
Deprecated. Invoking this procedure generates a warning.

DEPRECATED: this api is never used in upstream code. Having such widgets in the api makes it also difficult to style them.

Switches:
-calendar_details
(optional)
-date
(optional)
-days_of_week
(optional)
-large_calendar_p
(defaults to "0") (optional)
-master_bgcolor
(defaults to "black") (optional)
-header_bgcolor
(defaults to "black") (optional)
-header_text_color
(defaults to "white") (optional)
-header_text_size
(defaults to "+1") (optional)
-day_number_template
(defaults to "<!--$julian_date-->$day_number") (optional)
-day_header_size
(defaults to "1") (optional)
-day_header_bgcolor
(defaults to "#666666") (optional)
-calendar_width
(defaults to "0") (optional)
-day_bgcolor
(defaults to "#DDDDDD") (optional)
-day_text_color
(defaults to "white") (optional)
-empty_bgcolor
(defaults to "white") (optional)
-next_month_template
(optional)
-prev_month_template
(optional)
-width
(defaults to "2") (optional)
Returns:
a calendar year of small calendars for the year of the passed in date. Defaults to this year.

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_log_deprecated ad_log_deprecated (public) dt_get_info dt_get_info (public) dt_widget_year dt_widget_year (public, deprecated) dt_widget_calendar_year dt_widget_calendar_year dt_widget_calendar_year->_ dt_widget_calendar_year->ad_log_deprecated dt_widget_calendar_year->dt_get_info dt_widget_calendar_year->dt_widget_year

Testcases:
No testcase defined.

dt_widget_month (public, deprecated)

 dt_widget_month [ -calendar_details calendar_details ] [ -date date ] \
    [ -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 ] \
    [ -today_bgcolor today_bgcolor ] \
    [ -day_text_color day_text_color ] \
    [ -empty_bgcolor empty_bgcolor ] \
    [ -next_month_template next_month_template ] \
    [ -prev_month_template prev_month_template ] \
    [ -prev_next_links_in_title prev_next_links_in_title ] \
    [ -fill_all_days fill_all_days ] \
    [ -show_calendar_name_p show_calendar_name_p ]
Deprecated. Invoking this procedure generates a warning.

Switches:
-calendar_details
(optional)
-date
(optional)
-days_of_week
(optional)
-large_calendar_p
(defaults to "1") (optional)
-master_bgcolor
(defaults to "black") (optional)
-header_bgcolor
(defaults to "black") (optional)
-header_text_color
(defaults to "white") (optional)
-header_text_size
(defaults to "+2") (optional)
-day_number_template
(defaults to "<!--$julian_date-->$day_number") (optional)
-day_header_size
(defaults to "2") (optional)
-day_header_bgcolor
(defaults to "#666666") (optional)
-calendar_width
(defaults to "100%") (optional)
-day_bgcolor
(defaults to "#DDDDDD") (optional)
-today_bgcolor
(defaults to "#DDDDDD") (optional)
-day_text_color
(defaults to "white") (optional)
-empty_bgcolor
(defaults to "white") (optional)
-next_month_template
(optional)
-prev_month_template
(optional)
-prev_next_links_in_title
(defaults to "0") (optional)
-fill_all_days
(defaults to "0") (optional)
-show_calendar_name_p
(defaults to "1") (optional)
Returns:
a calendar for a specific month, with details supplied by Julian date. Defaults to this month. 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. DEPRECATED: modern HTML5 feature make this widget less relevant. It is also cumbersome to style and localize.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 dt_widget_month_small dt_widget_month_small (public, deprecated) dt_widget_month dt_widget_month dt_widget_month_small->dt_widget_month _ _ (public) dt_widget_month->_ ad_log_deprecated ad_log_deprecated (public) dt_widget_month->ad_log_deprecated dt_ansi_to_julian dt_ansi_to_julian (public) dt_widget_month->dt_ansi_to_julian dt_ansi_to_list dt_ansi_to_list (public) dt_widget_month->dt_ansi_to_list dt_get_info dt_get_info (public) dt_widget_month->dt_get_info

Testcases:
No testcase defined.

dt_widget_month_centered (public, deprecated)

 dt_widget_month_centered [ -calendar_details calendar_details ] \
    [ -date date ] [ -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 ]
Deprecated. Invoking this procedure generates a warning.

DEPRECATED: modern HTML5 feature make this widget less relevant. It is also cumbersome to style and localize.

Switches:
-calendar_details
(optional)
-date
(optional)
-days_of_week
(optional)
-large_calendar_p
(defaults to "0") (optional)
-master_bgcolor
(defaults to "black") (optional)
-header_bgcolor
(defaults to "black") (optional)
-header_text_color
(defaults to "white") (optional)
-header_text_size
(defaults to "+1") (optional)
-day_number_template
(defaults to "<!--$julian_date-->$day_number") (optional)
-day_header_size
(defaults to "1") (optional)
-day_header_bgcolor
(defaults to "#666666") (optional)
-calendar_width
(defaults to "0") (optional)
-day_bgcolor
(defaults to "#DDDDDD") (optional)
-day_text_color
(defaults to "white") (optional)
-empty_bgcolor
(defaults to "white") (optional)
-next_month_template
(optional)
-prev_month_template
(optional)
Returns:
a calendar for a specific month, with details supplied by Julian date. Defaults to this month.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_log_deprecated ad_log_deprecated (public) dt_get_info dt_get_info (public) dt_widget_month_small dt_widget_month_small (public, deprecated) dt_widget_month_centered dt_widget_month_centered dt_widget_month_centered->_ dt_widget_month_centered->ad_log_deprecated dt_widget_month_centered->dt_get_info dt_widget_month_centered->dt_widget_month_small

Testcases:
No testcase defined.

dt_widget_month_small (public, deprecated)

 dt_widget_month_small [ -calendar_details calendar_details ] \
    [ -date date ] [ -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 ]
Deprecated. Invoking this procedure generates a warning.

DEPRECATED: modern HTML5 feature make this widget less relevant. It is also cumbersome to style and localize.

Switches:
-calendar_details
(optional)
-date
(optional)
-days_of_week
(optional)
-large_calendar_p
(defaults to "0") (optional)
-master_bgcolor
(defaults to "black") (optional)
-header_bgcolor
(defaults to "black") (optional)
-header_text_color
(defaults to "white") (optional)
-header_text_size
(defaults to "+1") (optional)
-day_number_template
(defaults to "<!--$julian_date-->$day_number") (optional)
-day_header_size
(defaults to "1") (optional)
-day_header_bgcolor
(defaults to "#666666") (optional)
-calendar_width
(defaults to "0") (optional)
-day_bgcolor
(defaults to "#DDDDDD") (optional)
-day_text_color
(defaults to "white") (optional)
-empty_bgcolor
(defaults to "white") (optional)
-next_month_template
(optional)
-prev_month_template
(optional)
Returns:
a small calendar for a specific month. Defaults to this month.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 dt_widget_month_centered dt_widget_month_centered (public, deprecated) dt_widget_month_small dt_widget_month_small dt_widget_month_centered->dt_widget_month_small dt_widget_year dt_widget_year (public, deprecated) dt_widget_year->dt_widget_month_small _ _ (public) dt_widget_month_small->_ ad_log_deprecated ad_log_deprecated (public) dt_widget_month_small->ad_log_deprecated dt_widget_month dt_widget_month (public, deprecated) dt_widget_month_small->dt_widget_month

Testcases:
No testcase defined.

dt_widget_year (public, deprecated)

 dt_widget_year [ -calendar_details calendar_details ] [ -date date ] \
    [ -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 ] [ -width width ]
Deprecated. Invoking this procedure generates a warning.

Switches:
-calendar_details
(optional)
-date
(optional)
-days_of_week
(optional)
-large_calendar_p
(defaults to "0") (optional)
-master_bgcolor
(defaults to "black") (optional)
-header_bgcolor
(defaults to "black") (optional)
-header_text_color
(defaults to "white") (optional)
-header_text_size
(defaults to "+1") (optional)
-day_number_template
(defaults to "<!--$julian_date-->$day_number") (optional)
-day_header_size
(defaults to "1") (optional)
-day_header_bgcolor
(defaults to "#666666") (optional)
-calendar_width
(defaults to "0") (optional)
-day_bgcolor
(defaults to "#DDDDDD") (optional)
-day_text_color
(defaults to "white") (optional)
-empty_bgcolor
(defaults to "white") (optional)
-next_month_template
(optional)
-prev_month_template
(optional)
-width
(defaults to "2") (optional)
Returns:
a year of small calendars given the starting month as a date. Defaults to this month. Data in calendar_details will be ignored.

Partial Call Graph (max 5 caller/called nodes):
%3 dt_widget_calendar_year dt_widget_calendar_year (public, deprecated) dt_widget_year dt_widget_year dt_widget_calendar_year->dt_widget_year _ _ (public) dt_widget_year->_ ad_log_deprecated ad_log_deprecated (public) dt_widget_year->ad_log_deprecated dt_get_info dt_get_info (public) dt_widget_year->dt_get_info dt_widget_month_small dt_widget_month_small (public, deprecated) dt_widget_year->dt_widget_month_small

Testcases:
No testcase defined.
[ show source ]