Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs-oracle.xql 22 Jan 2002 23:59:34 -0000 1.1
+++ openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs-oracle.xql 23 Jan 2002 07:36:31 -0000 1.2
@@ -17,5 +17,17 @@
+
+
+select to_char(to_date(:current_date, 'yyyy-mm-dd'), 'Day, DD Month YYYY')
+as day_of_the_week,
+to_char(to_date(:current_date, 'yyyy-mm-dd')-1, 'yyyy-mm-dd')
+as yesterday,
+to_char(to_date(:current_date, 'yyyy-mm-dd')+1, 'yyyy-mm-dd')
+as tomorrow
+from dual
+
+
+
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.2 -r1.3
--- openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 23 Jan 2002 06:16:16 -0000 1.2
+++ openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 23 Jan 2002 07:36:31 -0000 1.3
@@ -114,15 +114,25 @@
set calendar_details [ns_set create calendar_details]
}
+ # Select some basic stuff
+ db_1row select_day_info {}
+
# Loop through the hours of the day
- set return_html "
\n"
+ set return_html "
+\n"
if {$show_nav} {
- append return_html "< $date > | \n"
+ append return_html "< $day_of_the_week > | \n"
}
for {set hour $start_hour} {$hour < $end_hour} {incr hour} {
+ if {$hour < 10} {
+ set index_hour "0$hour"
+ } else {
+ set index_hour $hour
+ }
+
# display stuff
if {$hour >= 12} {
set ampm_hour [expr $hour - 12]
@@ -150,11 +160,17 @@
append display_hour "am"
}
- append return_html "$display_hour | \n"
+ append return_html " | $display_hour | "
+ if {[ns_set find $calendar_details $index_hour] != -1} {
+ append return_html ""
+ } else {
+ append return_html " | "
+ }
+
# Go through events
while {1} {
- set index [ns_set find $calendar_details $hour]
+ set index [ns_set find $calendar_details $index_hour]
if {$index == -1} {
break
}
@@ -164,10 +180,10 @@
ns_set delete $calendar_details $index
}
- append return_html " | \n"
+ append return_html "\n"
}
- append return_html " "
+ append return_html " |
"
return $return_html
}