code: function getDate (dateString) {
    var date = new Date(dateString);
  
    if (Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date.getTime())) {
      return date;
    }
  
    //try to fix invalid date
    date = fixInvalidDate(dateString);
  
    //if date still isn't valid there's not more we can do..
    if (!isNaN(date.getTime())) {
      return date;
    }
  }
docs: Parses a date string to a date
  
  @param dateString