Tri Nguyen Tri Nguyen - 16 days ago 7
Java Question

Java - get Monday date of a week give a date in that week

I got a date

YYYY-MM-DD
how can I get the Monday date of that date whatever the given date is?

Answer
LocalDate monday = 
    localDate.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY);
Comments