calendar::item::dates_valid_p (private)

 calendar::item::dates_valid_p -start_date start_date \
    -end_date end_date

Defined in packages/calendar/tcl/cal-item-procs.tcl

A sanity check that the start time is before the end time.

Switches:
-start_date (required)
-end_date (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_cal_item_start_end_date_validation cal_item_start_end_date_validation (test calendar) calendar::item::dates_valid_p calendar::item::dates_valid_p test_cal_item_start_end_date_validation->calendar::item::dates_valid_p ad_log ad_log (public) calendar::item::dates_valid_p->ad_log db_string db_string (public) calendar::item::dates_valid_p->db_string calendar::item::edit calendar::item::edit (public) calendar::item::edit->calendar::item::dates_valid_p calendar::item::new calendar::item::new (public) calendar::item::new->calendar::item::dates_valid_p packages/calendar/www/cal-item-create-recurrence.tcl packages/calendar/ www/cal-item-create-recurrence.tcl packages/calendar/www/cal-item-create-recurrence.tcl->calendar::item::dates_valid_p packages/calendar/www/cal-item-new.tcl packages/calendar/ www/cal-item-new.tcl packages/calendar/www/cal-item-new.tcl->calendar::item::dates_valid_p

Testcases:
cal_item_start_end_date_validation
Source code:
    try {
        return [db_string dates_valid_p_select {
            select CASE
              WHEN cast(:start_date as timestamp with time zone)
                   <=
                   cast(:end_date as timestamp with time zone) THEN 1
              ELSE 0
            END from dual
        }]
    } on error {errmsg} {
        # Invalid dates in input, definitely not ok.
        ad_log warning $errmsg
        return 0
    }
Generic XQL file:
packages/calendar/tcl/cal-item-procs.xql

PostgreSQL XQL file:
packages/calendar/tcl/cal-item-procs-postgresql.xql

Oracle XQL file:
packages/calendar/tcl/cal-item-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: