raw/ace/assets/js/uncompressed/date-time/moment.js
function addOrSubtractDurationFromMoment(mom, duration, isAdding) {
        var ms = duration._milliseconds,
            d = duration._days,
            M = duration._months,
            currentDate;

        if (ms) {
            mom._d.setTime(+mom + ms * isAdding);
        }
        if (d) {
            mom.date(mom.date() + d * isAdding);
        }
        if (M) {
            currentDate = mom.date();
            mom.date(1)
                .month(mom.month() + M * isAdding)
                .date(Math.min(currentDate, mom.daysInMonth()));
        }
    }
function addOrSubtractDurationFromMoment(mom, duration, isAdding) {
        var ms = duration._milliseconds,
            d = duration._days,
            M = duration._months,
            currentDate;

        if (ms) {
            mom._d.setTime(+mom + ms * isAdding);
        }
        if (d) {
            mom.date(mom.date() + d * isAdding);
        }
        if (M) {
            currentDate = mom.date();
            mom.date(1)
                .month(mom.month() + M * isAdding)
                .date(Math.min(currentDate, mom.daysInMonth()));
        }
    }
function addOrSubtractDurationFromMoment ( mom , duration , isAdding ) { var ms = duration . _milliseconds , d = duration . _days , M = duration . _months , currentDate ; if ( ms ) { mom . _d . setTime ( + mom + ms * isAdding ) ; } if ( d ) { mom . date ( mom . date ( ) + d * isAdding ) ; } if ( M ) { currentDate = mom . date ( ) ; mom . date ( 1 ) . month ( mom . month ( ) + M * isAdding ) . date ( Math . min ( currentDate , mom . daysInMonth ( ) ) ) ; } }
helper function for _.addTime and _.subtractTime
helper function for _ . addTime and _ . subtractTime