 					END IF;
 				END IF;
 		END CASE;
-		RAISE WARNING 'Result (%,%)',_computed_date_pair.start_date,_computed_date_pair.end_date;
+		-- RAISE DEBUG 'Result (%,%)',_computed_date_pair.start_date,_computed_date_pair.end_date;
 		RETURN _computed_date_pair;
 	END;
 	$$;

		_cal_elt_number integer;
		_rank_to_ignore integer;
	BEGIN
		RAISE WARNING 'Calculate calendar %, _rank = %', _calendar_id, _rank;
		_cal_elt_rank_found := FALSE;
		_cal_elt_number := 0;
		_rank_to_ignore := 0; -- There is never rank = 0 (start at 1)

			LOOP
				-- Note that we use start_date & end_date of a calendar element with an included calendar_id
				-- It is working only because we always duplicate computed_start_date/ computed_end_date of a calendar in all calendar element witch include it !
				-- RAISE DEBUG 'CalElt % : start = %, end = %, operator = %, rank = %', _cal.id, _cal.start_date, _cal.end_date, _cal.operator, _cal.rank;			
				-- First we need to remember the first date bounds
				IF _cal_elt_number = 0 THEN -- Must be true for _cal.rank = 1
					_computed_date_pair.start_date := _cal.start_date;
