endCal.setTimeInMillis(end);
return new Calendar[] {startCal, endCal};
}
public static Calendar[] getLastQuarter(Calendar referenceCalendar) {
Quarter quarter = new Quarter(referenceCalendar.getTime());
Calendar startCal = getInstance();
Calendar endCal = getInstance();
long start = quarter.previous().getFirstMillisecond(getInstance());
long end = quarter.previous().getLastMillisecond(getInstance());
startCal.setTimeInMillis(start);
endCal.setTimeInMillis(end);
return new Calendar[] {startCal, endCal};
}