1LocalDate today = LocalDate.now();
2LocalDate yesterday = today.minusDays(1);
3
4// In string format
5LocalDate today = LocalDate.now();
6String yesterday = (today.minusDays(1)).format(DateTimeFormatter.ISO_DATE);
1Date date = DateUtils.addDays(new Date(), -1);
2SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
3return sdf.format(date);
4