根据当前时间获取当前周的周一到周日的日期
public class DateUtils {/*** 周一* @return*/public String getMonday(){SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式Calendar cld = Calendar.getInstance(Locale.CHINA);cld.setFirstDayOfWeek(Calendar.MONDAY);//以周一为首日cld.setTimeInMillis(System.currentTimeMillis());//当前时间cld.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);//周一System.out.println(df.format(cld.getTime()));return df.format(cld.getTime());}/*** 周二* @return*/public String getTuesday(){SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式Calendar cld = Calendar.getInstance(Locale.CHINA);cld.setFirstDayOfWeek(Calendar.MONDAY);//以周一为首日cld.setTimeInMillis(System.currentTimeMillis());//当前时间cld.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);//周二System.out.println(df.format(cld.getTime()));return df.format(cld.getTime());}/*** 周三* @return*/public String getWednesday(){SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式Calendar cld = Calendar.getInstance(Locale.CHINA);cld.setFirstDayOfWeek(Calendar.MONDAY);//以周一为首日cld.setTimeInMillis(System.currentTimeMillis());//当前时间cld.set(Calendar.DAY_OF_WEEK, Calendar.WEDNESDAY);//周三System.out.println(df.format(cld.getTime()));return df.format(cld.getTime());}/*** 周四* @return*/public String getThursday(){SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式Calendar cld = Calendar.getInstance(Locale.CHINA);cld.setFirstDayOfWeek(Calendar.MONDAY);//以周一为首日cld.setTimeInMillis(System.currentTimeMillis());//当前时间cld.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);//周四System.out.println(df.format(cld.getTime()));return df.format(cld.getTime());}/*** 周五* @return*/public String getFriday(){SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式Calendar cld = Calendar.getInstance(Locale.CHINA);cld.setFirstDayOfWeek(Calendar.MONDAY);//以周一为首日cld.setTimeInMillis(System.currentTimeMillis());//当前时间cld.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);//周五System.out.println(df.format(cld.getTime()));return df.format(cld.getTime());}/*** 周六* @return*/public String getSaturday(){SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式Calendar cld = Calendar.getInstance(Locale.CHINA);cld.setFirstDayOfWeek(Calendar.MONDAY);//以周一为首日cld.setTimeInMillis(System.currentTimeMillis());//当前时间cld.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);//周六System.out.println(df.format(cld.getTime()));return df.format(cld.getTime());}/*** 周日* @return*/public String getSunday(){SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式Calendar cld = Calendar.getInstance(Locale.CHINA);cld.setFirstDayOfWeek(Calendar.MONDAY);//以周一为首日cld.setTimeInMillis(System.currentTimeMillis());//当前时间cld.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);//周日System.out.println(df.format(cld.getTime()));return df.format(cld.getTime());}}