code: function(date, offset, period) {
          var year = date.year();
          var monthIndex = date.month();
          var isIntercalary = this.isIntercalaryMonth(year, monthIndex);
          var month = this.toChineseMonth(year, monthIndex);
  
          var cdate = Object.getPrototypeOf(ChineseCalendar.prototype)
              .add.call(this, date, offset, period);
  
          if (period === 'y') {
              // Resync month
              var resultYear = cdate.year();
              var resultMonthIndex = cdate.month();
  
              // Using the fact the month index of an intercalary month
              // equals its month number:
              var resultCanBeIntercalaryMonth =
                  this.isIntercalaryMonth(resultYear, month);
  
              var correctedMonthIndex =
                  (isIntercalary && resultCanBeIntercalaryMonth) ?
                  this.toMonthIndex(resultYear, month, true) :
                  this.toMonthIndex(resultYear, month, false);
  
              if (correctedMonthIndex !== resultMonthIndex) {
                  cdate.month(correctedMonthIndex);
              }
          }
  
          return cdate;
      }
docs: Add period(s) to a date.
  Cater for no year zero.
  @memberof ChineseCalendar
  @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.
  @throws Error if a different calendar used.