Lines Matching refs:date
23 // initialize to current date
32 * Creates a date object from the |year| and |week|.
35 Calendar date = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
36 date.clear();
37 date.setFirstDayOfWeek(Calendar.MONDAY);
38 date.setMinimalDaysInFirstWeek(4);
39 date.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
40 date.set(Calendar.YEAR, year);
41 date.set(Calendar.WEEK_OF_YEAR, week);
42 return date;
46 * Creates a date object from the |value| which is milliseconds since epoch.
49 Calendar date = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
50 date.clear();
51 date.setFirstDayOfWeek(Calendar.MONDAY);
52 date.setMinimalDaysInFirstWeek(4);
53 date.setTimeInMillis((long) value);
54 return date;
62 public static int getISOWeekYearForDate(Calendar date) {
63 int year = date.get(Calendar.YEAR);
64 int month = date.get(Calendar.MONTH);
65 int week = date.get(Calendar.WEEK_OF_YEAR);
74 public static int getWeekForDate(Calendar date) {
75 return date.get(Calendar.WEEK_OF_YEAR);
80 Calendar date = createDateFromWeek(year, week);
81 if (date.before(getMinDate())) {
83 } else if (date.after(getMaxDate())) {
86 setCurrentDate(date);
91 // Create a date in the middle of the year, where the week year matches the year.
92 Calendar date = createDateFromWeek(year, 20);
93 return date.getActualMaximum(Calendar.WEEK_OF_YEAR);