Given a java.util.Date object how do I go about finding what Quarter it\'s in?
Assuming Q1 = Jan Feb Mar, Q2 = Apr, May, Jun, etc.
I use this method.
public static Integer getQuarter(Date d){ Calendar c = Calendar.getInstance(); c.setTime(d); int month = c.get(Calendar.MONTH); return (month /3)+1; }