function dateAdd(date, part, increment){
    var day = date.getDate(), month = date.getMonth(), year = date.getFullYear();
    switch(part){
        case 'd':
            day += increment;
            break;
        case 'm':
            month += increment;
            break;
        case 'y':
            year += increment;
            break;
    }
    return new Date(year, month, day);
}
/*
**    Description:    Changes the passed in date by adding or subtracting a specified number of date part units from the initial value
**    Arguments:        date (dateTime) - the original date to be modified
**                    part (string) - the part of the date to add or subtract from. Currently supports 'd' (day), 'm' (month), 'y' (year)
**                    increment (numeric) - the amount by which to increase (positive number) or decrease (negative number) the date
*/
Changes the passed in date by adding or subtracting a specified number of date part units from the initial value
Arguments:        date (dateTime) - the original date to be modified
part (string) - the part of the date to add or subtract from.
Changes the passed in date by adding or subtracting a specified number of date part units from the initial value Arguments : date ( dateTime ) - the original date to be modified part ( string ) - the part of the date to add or subtract from .
function dateAdd(date, part, increment){
    var day = date.getDate(), month = date.getMonth(), year = date.getFullYear();
    switch(part){
        case 'd':
            day += increment;
            break;
        case 'm':
            month += increment;
            break;
        case 'y':
            year += increment;
            break;
    }
    return new Date(year, month, day);
}
function dateAdd ( date , part , increment ) { var day = date . getDate ( ) , month = date . getMonth ( ) , year = date . getFullYear ( ) ; switch ( part ) { case 'd' : day += increment ; break ; case 'm' : month += increment ; break ; case 'y' : year += increment ; break ; } return new Date ( year , month , day ) ; }
Description:    Changes the passed in date by adding or subtracting a specified number of date part units from the initial value
Arguments:        date (dateTime) - the original date to be modified
part (string) - the part of the date to add or subtract from.
Description : Changes the passed in date by adding or subtracting a specified number of date part units from the initial value Arguments : date ( dateTime ) - the original date to be modified part ( string ) - the part of the date to add or subtract from .