resyncYearMonth = function(calendar) {
              while (m < calendar.minMonth) {
                y--;
                m += calendar.monthsInYear(y);
              }
              var yearMonths = calendar.monthsInYear(y);
              while (m > yearMonths - 1 + calendar.minMonth) {
                y++;
                m -= yearMonths;
                yearMonths = calendar.monthsInYear(y);
              }
            }
Add period(s) to a date.
            @memberof BaseCalendar
            @private
            @param date {CDate} The starting date.
            @param offset {number} The number of periods to adjust by.
            @param period {string} One of 'y' for year, 'm' for month, 'w' for week, 'd' for day.
            @return {CDate} The updated date.