code: function(date) {
          var returnDate = [];
      
          if (date instanceof Date) {
              returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]];
          } else if (Lang.isString(date)) {
              returnDate = this._parseDates(date);
          } else if (Lang.isArray(date)) {
              for (var i=0;i<date.length;++i) {
                  var d = date[i];
                  returnDate[returnDate.length] = [d.getFullYear(),d.getMonth()+1,d.getDate()];
              }
          }
          
          return returnDate;
      }
docs: BEGIN TYPE CONVERSION METHODS 
  Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
  used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
  @method _toFieldArray
  @private
  @param {String/Date/Date[]} date The date string of dates to deselect in the current calendar. Valid formats are
  individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006).
  Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005).
  This method can also take a JavaScript Date object or an array of Date objects.
  @return {Array[](Number[])} Array of date field arrays