code: function(year, month, day, error) {
  			if (year.year) {
  				if (this._validateLevel === 0 && this.name !== year.calendar().name) {
  					throw ($.calendars.local.differentCalendars || $.calendars.regionalOptions[''].differentCalendars).
  						replace(/\{0\}/, this.local.name).replace(/\{1\}/, year.calendar().local.name);
  				}
  				return year;
  			}
  			try {
  				this._validateLevel++;
  				if (this._validateLevel === 1 && !this.isValid(year, month, day)) {
  					throw error.replace(/\{0\}/, this.local.name);
  				}
  				var date = this.newDate(year, month, day);
  				this._validateLevel--;
  				return date;
  			}
  			catch (e) {
  				this._validateLevel--;
  				throw e;
  			}
  		}
docs: Check that a candidate date is from the same calendar and is valid.
  @memberof BaseCalendar
  @private
  @param year {CDate|number} The date to validate or the year to validate.
  @param [month] {number} The month to validate.
  @param [day] {number} The day to validate.
  @param error {string} Rrror message if invalid.
  @throws Error if different calendars used or invalid date.