 				{
 					var temp:Date = _selectedRanges[n].rangeEnd;
 					
-					_selectedRanges[n].rangeEnd = incrementDate(startDate, -1);
+					_selectedRanges[n].rangeEnd = addSubtractDays(startDate, -1);
 					
 					_selectedRanges[selectedRangeCount] = {};
 					_selectedRanges[selectedRangeCount].rangeStart =
-						incrementDate(endDate);
+						addSubtractDays(endDate, 1);
 					_selectedRanges[selectedRangeCount].rangeEnd = temp;
 					
 					selectedRangeCount += 1;
 				}
 				else
 				{
-					_selectedRanges[n].rangeEnd = incrementDate(startDate, -1);
+					_selectedRanges[n].rangeEnd = addSubtractDays(startDate, -1);
 				}
 			}
 		}

			{
				if (endDate < rangeEnd)
				{
					_selectedRanges[n].rangeStart = incrementDate(endDate);
				}
				else
				{

     *  Increments/decrements a date by 'No. of days'
     *  specified by amount and returns the new date.
     */
    mx_internal function addSubtractDays(value:Date, amount:int):Date
    {
        var newDate:Date = new Date(value);
		
        return new Date(newDate.fullYear, newDate.month, newDate.date + amount);
    }

    /**
