text: import { NotImplementedError } from '../extensions/index.js';
  
  
  export default function getSeason(date) {
    if (!date) { return 'Unable to determine the time of year!'; }
    try {
      date.getTime();
    }
    catch (error) {
      throw new Error('Invalid date!');
    }
    let month = date.getMonth();
    if (month < 2 || month === 11) {
      return 'winter';
    } else if (month < 5) {
      return 'spring';
    } else if (month < 8) {
      return 'summer';
    } else  if (month < 11) {
      return 'autumn';
    }
  }