获取星期天的日期

//获取星期天的日期
Date date = new Date(System.currentTimeMillis());
Calendar cal = new GregorianCalendar();
cal.setTime(date);
cal.setFirstDayOfWeek(cal.MONDAY);
cal.set(cal.DAY_OF_WEEK,cal.SUNDAY);
String endDTForTitle = cal.get(Calendar.YEAR)+ "."+(cal.get(Calendar.MONTH)+1)+ "."+cal.get(Calendar.DAY_OF_MONTH);

你可能感兴趣的:(日期)