text: import { NotImplementedError } from '../extensions/index.js';
  
  /**
   * Extract season from given date and expose the enemy scout!
   * 
   * @param {Date | FakeDate} date real or fake date
   * @returns {String} time of the year
   * 
   * @example
   * 
   * getSeason(new Date(2020, 02, 31)) => 'spring'
   * 
   */
  export default function getSeason(date) {
    if (!date) {
      return 'Unable to determine the time of year!'
    }
    if (!(date instanceof Date)) {
      throw Error('Invalid date!');
    }
    try {
      date.getUTCDate();
    } catch (TypeError) {
      throw Error('Invalid date!');
    }
    let Month = date.getMonth();
    let result= "";
    switch(Month) {
      case 0:
        result = "winter"
        break;
      case 1:
        result = "winter"
        break;
      case 11:
        result = "winter"
        break;
      case 2:
        result = "spring"
        break;
      case 3:
        result = "spring"
        break;
      case 4:
        result = "spring"
        break;
      case 8:
        result = "autumn"
        break;
      case 9:
        result = "autumn"
        break;
      case 10:
        result = "autumn"
        break;
      case 5:
      result = "summer"
      break;
      case 6:
        result = "summer"
        break;
      case 7:
        result = "summer"
        break;
    }
    return result;
  }
  