I have current date, and a constant which tells from which day the week starts. I want to get the start date of the week based on that constant. If I hardcode the first day
DateTimeFormatter format = DateTimeFormatter.ofPattern("MM/dd/yyyy"); LocalDate now = LocalDate.now(); String startDate = now.with(TemporalAdjusters.previous(DayOfWeek.SUNDAY)).format(format);