                 if (dayOffset < 0)
                     dayOffset += 7;
 
-                tempDate = incrementDate(tempDate,dayOffset)
+                tempDate = addSubtractDays(tempDate, dayOffset);
 
                 while (tempDate < maxDate)
                 {
-                    removeRangeFromSelection(tempDate,tempDate);
-                    tempDate = incrementDate(tempDate,7)
+                    removeRangeFromSelection(tempDate, tempDate);
+                    tempDate = addSubtractDays(tempDate, 7);
                 }
             }
         }

     *  Increments/decrements a date by 'No. of days'
     *  specified by amount and returns the new date.
     */
    mx_internal function incrementDate(value:Date, amount:int = 1):Date
    {
        var newDate:Date = new Date(value);
        var time:Number = newDate.getTime();
        newDate.setTime(time + amount * 86400000);
        return newDate;
    }

    /**

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