ThisLocalizedWeek { public Date getFirstDay() { LocalDate localDate = LocalDate.now(TZ).with(TemporalAdjusters.previousOrSame(this.firstDayOfWeek)); if (LocalDate.now().getDayOfWeek().equals(DayOfWeek.SUNDAY)){ localDate= localDate.plus(-7,ChronoUnit.DAYS); } Date date = Date.from(localDate.atStartOfDay(ZoneId.of("Asia/Shanghai")).toInstant().plus(1,ChronoUnit.DAYS)); return DateUtils.parse(date); } ThisLocalizedWeek(final Locale locale); Date getFirstDay(); Date getLastDay(); Date getPreFirstDay(); Date getPreLastDay(); Date getFirstDay(String date); Date getLastDay(String date); @Override String toString();  }
@Test public void getFirstDay() throws ParseException { ThisLocalizedWeek thisLocalizedWeek = new ThisLocalizedWeek(Locale.CHINA); Date firstDay = thisLocalizedWeek.getFirstDay(); Date firstday1 = DateUtils.parse(firstDay); System.out.println(DateUtils.parseForFrontEnd1(firstday1)); Date firstDay2 = thisLocalizedWeek.getLastDay(); System.out.println(DateUtils.parseForFrontEnd1(firstDay2)); }