code: function(year, month, isIntercalary) {
          // compute intercalary month in the year (0 if none)
          var intercalaryMonth = this.intercalaryMonth(year);
  
          // validate month
          var invalidIntercalaryMonth = 
              (isIntercalary && month !== intercalaryMonth);
          if (invalidIntercalaryMonth || month < 1 || month > 12) {
              throw main.local.invalidMonth
                  .replace(/\{0\}/, this.local.name);
          }
  
          // compute month index
          var monthIndex;
  
          if (!intercalaryMonth) {
              monthIndex = month - 1;
          } else if(!isIntercalary && month <= intercalaryMonth) {
              monthIndex = month - 1;
          } else {
              monthIndex = month;
          }
  
          return monthIndex;
      }
docs: Retrieve the month index (i.e. accounting for intercalary months).
  @memberof ChineseCalendar
  @param year {number} The year.
  @param month {number} The month (1 for first month).
  @param [isIntercalary=false] {boolean} If month is intercalary.
  @return {number} The month index (0 for first month).
  @throws Error if an invalid month/year or a different calendar used.