- 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.10 2024/07/30 08:57:45 antoniop Exp $
Procedures in this file
- dt_get_info (public)
- dt_left_arrow (private)
- dt_navbar_month (private)
- dt_navbar_view (private)
- dt_navbar_year (private)
- dt_right_arrow (private)
- dt_widget_calendar_navigation (public, deprecated)
- dt_widget_calendar_year (public, deprecated)
- dt_widget_month (public, deprecated)
- dt_widget_month_centered (public, deprecated)
- dt_widget_month_small (public, deprecated)
- dt_widget_year (public, deprecated)
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 (optional, boolean)
- 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)
- ANSI formatted date string (yyyy-mm-dd). If not specified this procedure will default to today's date.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- dt_get_info
dt_left_arrow (private)
dt_left_arrow
- Returns:
- the image location for a left navigation arrow
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
dt_navbar_month (private)
dt_navbar_month view base_url date
- Parameters:
- view (required)
- base_url (required)
- date (required)
- Returns:
- the monthly navbar
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
dt_navbar_view (private)
dt_navbar_view view base_url date
- Parameters:
- view (required)
- base_url (required)
- date (required)
- Returns:
- a navbar for the mini_calendar_widget
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
dt_navbar_year (private)
dt_navbar_year view base_url date
If this is a month or year view, returns the current year with links to previous and next. Otherwise it just returns the empty string.
- Parameters:
- view (required)
- base_url (required)
- date (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
dt_right_arrow (private)
dt_right_arrow
- Returns:
- the image location for a right navigation arrow
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
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 (optional, defaults to
"week"
)- date (optional)
- pass_in_vars (optional)
- Partial Call Graph (max 5 caller/called nodes):
- 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 (optional, defaults to
"0"
)- -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
"+1"
)- -day_number_template (optional, defaults to
"<!--$julian_date-->$day_number"
)- -day_header_size (optional, defaults to
"1"
)- -day_header_bgcolor (optional, defaults to
"#666666"
)- -calendar_width (optional, defaults to
"0"
)- -day_bgcolor (optional, defaults to
"#DDDDDD"
)- -day_text_color (optional, defaults to
"white"
)- -empty_bgcolor (optional, defaults to
"white"
)- -next_month_template (optional)
- -prev_month_template (optional)
- -width (optional, defaults to
"2"
)- 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):
- 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 (optional, defaults to
"1"
)- -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"
)- -day_number_template (optional, defaults to
"<!--$julian_date-->$day_number"
)- -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
"#DDDDDD"
)- -today_bgcolor (optional, defaults to
"#DDDDDD"
)- -day_text_color (optional, defaults to
"white"
)- -empty_bgcolor (optional, defaults to
"white"
)- -next_month_template (optional)
- -prev_month_template (optional)
- -prev_next_links_in_title (optional, defaults to
"0"
)- -fill_all_days (optional, defaults to
"0"
)- -show_calendar_name_p (optional, defaults to
"1"
)- 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):
- 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 (optional, defaults to
"0"
)- -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
"+1"
)- -day_number_template (optional, defaults to
"<!--$julian_date-->$day_number"
)- -day_header_size (optional, defaults to
"1"
)- -day_header_bgcolor (optional, defaults to
"#666666"
)- -calendar_width (optional, defaults to
"0"
)- -day_bgcolor (optional, defaults to
"#DDDDDD"
)- -day_text_color (optional, defaults to
"white"
)- -empty_bgcolor (optional, defaults to
"white"
)- -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):
- 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 (optional, defaults to
"0"
)- -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
"+1"
)- -day_number_template (optional, defaults to
"<!--$julian_date-->$day_number"
)- -day_header_size (optional, defaults to
"1"
)- -day_header_bgcolor (optional, defaults to
"#666666"
)- -calendar_width (optional, defaults to
"0"
)- -day_bgcolor (optional, defaults to
"#DDDDDD"
)- -day_text_color (optional, defaults to
"white"
)- -empty_bgcolor (optional, defaults to
"white"
)- -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):
- 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 (optional, defaults to
"0"
)- -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
"+1"
)- -day_number_template (optional, defaults to
"<!--$julian_date-->$day_number"
)- -day_header_size (optional, defaults to
"1"
)- -day_header_bgcolor (optional, defaults to
"#666666"
)- -calendar_width (optional, defaults to
"0"
)- -day_bgcolor (optional, defaults to
"#DDDDDD"
)- -day_text_color (optional, defaults to
"white"
)- -empty_bgcolor (optional, defaults to
"white"
)- -next_month_template (optional)
- -prev_month_template (optional)
- -width (optional, defaults to
"2"
)- 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):
- Testcases:
- No testcase defined.