Here you can find the source of yearAndSeason(Date date)
public static String yearAndSeason(Date date)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static String yearAndSeason(Date date) { final Calendar cal = Calendar.getInstance(); cal.setTime(date);/*from w w w .j av a2 s. c o m*/ return yearAndSeason(cal); } private static String yearAndSeason(Calendar cal) { return new StringBuilder().append(cal.get(Calendar.YEAR)).append(cal.get(Calendar.MONTH) / 3 + 1) .toString(); } }