public int getIndex() { return ordinal() + 1; }
public static Quarter getByName(String name) { try { return valueOf(name.toUpperCase()); } catch (Exception e) { return null; } }
public IntervalListQuarter(ColumnGroup columnGroup) { super(columnGroup); intervalMap = new HashMap<Integer, Interval>(); Month firstMonth = columnGroup.getFirstMonthOfYear(); int monthIndex = firstMonth.getIndex(); for (int i = 0; i < 4; i++) { Quarter quarter = Quarter.getByIndex(i+1); Interval interval = new Interval((Integer.toString(quarter.getIndex())), i); interval.setType(columnGroup.getIntervalSize()); this.add(interval); for (int j = 0; j < 3; j++) { intervalMap.put(monthIndex-1, interval); monthIndex = Month.nextIndex(monthIndex); } } }
int currentMonth = c.get(Calendar.MONTH); int firstMonthYear = columnGroup.getFirstMonthOfYear().getIndex(); int rest = Quarter.getPositionInQuarter(firstMonthYear, currentMonth + 1); c.add(Calendar.MONTH, rest * -1); c.set(Calendar.DAY_OF_MONTH, 1);
int firstMonth = Quarter.getQuarterFirstMonth(firstMonthOfYear.getIndex(), month + 1)-1; int yearInc = 0; int monthInc = 3;
int currentMonth = intervalMinDate.getMonth(); int firstMonthYear = columnGroup.getFirstMonthOfYear().getIndex(); int rest = Quarter.getPositionInQuarter(firstMonthYear, currentMonth + 1); intervalMinDate.setMonth(currentMonth - rest); intervalMinDate.setDate(1);
int firstMonth = Quarter.getQuarterFirstMonth(firstMonthOfYear.getIndex(), month + 1)-1; int yearInc = 0; int monthInc = 3;
int currentMonth = intervalMinDate.getMonth(); int firstMonthYear = columnGroup.getFirstMonthOfYear().getIndex(); int rest = Quarter.getPositionInQuarter(firstMonthYear, currentMonth + 1); intervalMinDate.setMonth(currentMonth - rest); intervalMinDate.setDate(1);
public static Quarter getByName(String name) { try { return valueOf(name.toUpperCase()); } catch (Exception e) { return null; } }
public int getIndex() { return ordinal() + 1; }