<p>I've had nothing but good luck from SO, so why not try again?</p>

<p>I have an application that needs to show a different image based on the season of the year (spring, summer, winter, fall).   I have very specific start and end dates for these seasons.</p>

<p>What I would like from you geniuses is a method called GetSeason that takes a date as input and returns a String value of Spring, Summer, Winter or Fall.   Here are the date ranges and their associated seasons:<br></p>

<p>Spring:3/1-4/30<br>
Summer:5/1-8/31<br>
Fall:9/1-10/31<br>
Winter: 11/1-2/28</p>

<p>Can someone provide a working method to return the proper season?
Thanks everyone!</p>

Well, it could be as simple as
```
```
String getSeason(int month) {
    switch(month) {
          case 11:
          case 12:
          case 1:
          case 2:
                return "winter";
          case 3:
          case 4:
                return "spring";
          case 5:
          case 6:
          case 7:
          case 8:
                return "summer";
          default:
                return "autumn";
      }
}
```
```
I have been chided in the comments into a better solution: enums:
```
```
public static Enum Season {
    WINTER(Arrays.asList(11,12,1,2)),
    SPRING(Arrays.asList(3,4)),
    SUMMER(Arrays.asList(5,6,7,8)),
    AUTUMN(Arrays.asList(9,10));

    Season(List<Integer> months) {
        this.monthlist = months;
    }
    private List<Integer> monthlist;
    public boolean inSeason(int month) {
        return this.monthlist.contains(month);  // if months are 0 based, then insert +1 before the )
    }

    public static Season seasonForMonth(int month) {
        for(Season s: Season.values()) {
            if (s.inSeason(month))
                 return s;
        }
        throw new IllegalArgumentException("Unknown month");
    }
}
```
```