{"size": 458, "ext": "js", "max_stars_repo_path": "src/what-season.js", "max_stars_repo_name": "AntonL-tech/basic-js", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/what-season.js", "max_issues_repo_name": "AntonL-tech/basic-js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/what-season.js", "max_forks_repo_name": "AntonL-tech/basic-js", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.8095238095, "max_line_length": 65, "alphanum_fraction": 0.5655021834}
module.exports = function getSeason(date) {
  if (!date) {
    return 'Unable to determine the time of year!';
  } else if (!(date instanceof Date && !isNaN(date.valueOf()))) {
    throw new Error();
  }

  let season = date.getMonth();

  if(season >= 2 && season < 5) {
    return 'spring';
  } else if(season >= 5 && season < 8) {
    return 'summer';
  } else if(season >= 8 && season < 11) {
    return 'autumn';
  } else {
    return 'winter';
  }
};

