 				{
 					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
				{

                if (dayOffset < 0)
                    dayOffset += 7;

                tempDate = addSubtractDays(tempDate, dayOffset);

                while (tempDate < maxDate)
                {
                    removeRangeFromSelection(tempDate, tempDate);
                    tempDate = addSubtractDays(tempDate, 7);
                }
            }
        }
