ThisLocalizedWeek { public Date getLastDay() { LocalDate localDate = LocalDate.now(TZ).with(TemporalAdjusters.nextOrSame(this.lastDayOfWeek)); if (LocalDate.now().getDayOfWeek().equals(DayOfWeek.SUNDAY)){ localDate= localDate.plus(-7,ChronoUnit.DAYS); } Date date = Date.from(localDate.atStartOfDay(ZoneId.of("Asia/Shanghai")).toInstant().plusSeconds(2*24*60*60-1)); 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 getLastDay() { LocalDate localDate = LocalDate.now(); localDate.getDayOfWeek(); }