code: function (dt, format) {
              return dateFormat(isInstanceOf(dt, SQL.Year) ? dt.date : dt, format || this.yearFormat);
          }
docs: Converts a {@link patio.sql.Year} to a string.
  The format used is {@link patio.Time#yearFormat},
  which defaults to {@link patio.Time#DEFAULT_YEAR_FORMAT}
  
  @example
  
  var date = new Date(2004, 1, 1, 1, 1, 1),
  year = new sql.Year(2004);
  patio.yearToString(date); //=> '2004'
  patio.yearToString(year); //=> '2004'
  patio.yearFormat = "yy";
  patio.yearToString(date); //=> '04'
  patio.yearToString(year); //=> '04'
  
  
  @param {Date\sql.Year} dt the year to covert to to a string.
  
  @returns {String} the date string.