Index: openacs-4/packages/acs-datetime/acs-datetime.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/acs-datetime.info,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-datetime/acs-datetime.info 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/acs-datetime/acs-datetime.info 23 Aug 2001 18:06:23 -0000 1.2 @@ -4,26 +4,32 @@ ACS DateTime ACS DateTime + f t - + oracle postgresql - Ron Henderson + Arjun Sanyal Service package to support date and time functions - 2001-02-08 - ArsDigita Corporation + 2001-08-23 + OpenACS.org + Note: this version of the package requires acs-event(s) for a helper function. This requirement may go away in the future. + + + + Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/Attic/acs-calendar-procs-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs-oracle.xql 23 Aug 2001 18:05:15 -0000 1.1 @@ -0,0 +1,28 @@ + + + + oracle8.1.6 + + + + + select to_char(to_date(:the_date,'yyyy-mm-dd'),'J') as julian_date_today, + to_char(trunc(to_date(:the_date, 'yyyy-mm-dd'), 'Month'), 'fmMonth') as month, + to_char(trunc(to_date(:the_date, 'yyyy-mm-dd'), 'Month'), 'YYYY') as year, + to_char(trunc(to_date(:the_date, 'yyyy-mm-dd'), 'Month'), 'J') as first_julian_date_of_month, + to_char(last_day(to_date(:the_date, 'yyyy-mm-dd')), 'DD') as num_days_in_month, + to_char(trunc(to_date(:the_date, 'yyyy-mm-dd'), 'Month'), 'D') as first_day_of_month, + to_char(last_day(to_date(:the_date, 'yyyy-mm-dd')), 'DD') as last_day, + trunc(add_months(to_date(:the_date, 'yyyy-mm-dd'), 1)) as next_month, + trunc(add_months(to_date(:the_date, 'yyyy-mm-dd'), -1)) as prev_month, + trunc(to_date(:the_date, 'yyyy-mm-dd'), 'yyyy') as beginning_of_year, + to_char(last_day(add_months(to_date(:the_date, 'yyyy-mm-dd'), -1)), 'DD') as days_in_last_month, + to_char(add_months(to_date(:the_date, 'yyyy-mm-dd'), 1), 'fmMonth') as next_month_name, + to_char(add_months(to_date(:the_date, 'yyyy-mm-dd'), -1), 'fmMonth') as prev_month_name + from dual + + + + + + Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/Attic/acs-calendar-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs-postgresql.xql 23 Aug 2001 18:04:38 -0000 1.1 @@ -0,0 +1,26 @@ + + + + postgresql7.1 + + + + +select to_char(to_date(:the_date,'yyyy-mm-dd'), 'J') as julian_date_today, + to_char(to_date(:the_date, 'yyyy-mm-dd'), 'fmMonth') as month, + to_char(to_date(:the_date, 'yyyy-mm-dd'), 'YYYY') as year, + to_char(date_trunc('month', to_date(:the_date, 'yyyy-mm-dd')), 'J') as first_julian_date_of_month, + to_char(last_day(to_date(:the_date, 'yyyy-mm-dd')), 'DD') as num_days_in_month, + to_char(date_trunc('month', to_date(:the_date, 'yyyy-mm-dd')), 'D') as first_day_of_month, + to_char(last_day(to_date(:the_date, 'yyyy-mm-dd')), 'DD') as last_day, + to_char(to_date(:the_date, 'yyyy-mm-dd') + '1 month'::interval, 'yyyy-mm-dd') as next_month, + to_char(to_date(:the_date, 'yyyy-mm-dd') - '1 month'::interval, 'yyyy-mm-dd') as prev_month, + to_char(date_trunc('year', to_date(:the_date, 'yyyy-mm-dd')), 'yyyy-mm-dd') as beginning_of_year, + to_char(last_day(to_date(:the_date, 'yyyy-mm-dd') - '1 month'::interval), 'DD') as days_in_last_month, + to_char(to_date(:the_date, 'yyyy-mm-dd') + '1 month'::interval, 'fmMonth') as next_month_name, + to_char(to_date(:the_date, 'yyyy-mm-dd') - '1 month'::interval, 'fmMonth') as prev_month_name; + + + + + Index: openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.xql 23 Aug 2001 18:05:49 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + + + + select to_char(to_date(:julian_date,'J'),'yyyy-mm-dd') + + + + +