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.
You are going to have to write your own code because the term "Quarter" is different for each business. Can't you just do something like:
Calendar c = /* get from somewhere */
int month = c.get(Calendar.MONTH);
return (month >= Calendar.JANUARY && month <= Calendar.MARCH) ? "Q1" :
(month >= Calendar.APRIL && month <= Calendar.JUNE) ? "Q2" :
(month >= Calendar.JULY && month <= Calendar.SEPTEMBER) ? "Q3" :
"Q4";