 			RAISE EXCEPTION 'DETECT LOOP INCLUSION %--- Loop inclusion ---',chr(10);
 		END IF;
 		BEGIN
-			-- Check all cal elt of the calendar of id "_included_calendar_id" 
+			-- Check all cal elt of the calendar of id "_included_calendar_id"
 			FOR _cal IN
 				SELECT included_calendar_id AS id FROM calendar_element WHERE calendar_id = _included_calendar_id AND included_calendar_id IS NOT NULL
 			LOOP
 				PERFORM detectcalendarinclusionloop(_cal.id, _first_calendar_id);
 			END LOOP;
-		EXCEPTION WHEN raise_exception THEN			
+		EXCEPTION WHEN raise_exception THEN
 			RAISE EXCEPTION '% %Parent calendar element = %',SQLERRM , chr(10), _included_calendar_id;
 		END;
     END;

		WHILE _iterator < _bit_mask_lenght
		LOOP
			IF get_bit(_bit_mask, _iterator) = 1 THEN
				_last_active_bit_index := _iterator;	
				IF _first_active_bit_index = -1 THEN -- This is the first 1
					_first_active_bit_index := _iterator;
					_bit_mask_text := '1';
				ELSE
					_bit_mask_text := _bit_mask_text || _segment_bit_mask || '1';
				END IF;			
				_segment_bit_mask := '';
			ELSE -- current mask value is 0
				IF _first_active_bit_index != -1 THEN

						_computed_date_pair.mask_length := _bit_mask_lenght;
					ELSE
						IF _start_date < previous_bounds.start_date THEN
							_start_bitmask_date := _start_date;
							_tmp_bitmask := (lpad('',previous_bounds.start_date - _start_bitmask_date,'0'))::bit varying;
							_previous_bit_mask_trimed := _tmp_bitmask || previous_bounds.bit_mask;
							_new_bit_mask_trimed := _bit_mask;
						ELSE
							_start_bitmask_date := previous_bounds.start_date;
							_tmp_bitmask := (lpad('',_start_date - _start_bitmask_date,'0'))::bit varying;
