01: package com.jidesoft.grouper.date;
02:
03: import com.jidesoft.grouper.GroupResources;
04: import com.jidesoft.grouper.GrouperContext;
05:
06: import java.util.Calendar;
07: import java.util.Locale;
08:
09: public class DateDayOfYearGrouper extends DateGrouper {
10: public static GrouperContext CONTEXT = new GrouperContext(
11: "DateDayOfYear");
12:
13: public Object getValue(Object value) {
14: return getCalendarField(value, Calendar.DAY_OF_YEAR);
15: }
16:
17: public String getName() {
18: return GroupResources.getResourceBundle(Locale.getDefault())
19: .getString("Date.dayOfYear");
20: }
21:
22: // public static void main(String[] args) {
23: // ObjectGrouper grouper = new DateDayOfYearGrouper();
24: // Calendar calendar = Calendar.getInstance();
25: // for (int i = 0; i < 200; i++) {
26: // System.out.println(grouper.getValue(calendar));
27: // calendar.roll(Calendar.DAY_OF_YEAR, 1);
28: // }
29: // }
30: }
|