Some places(country) start the week with Sunday, some with Monday, maybe some with others, IDK, some this magic let java library find the right one for us. Berechnen Sie den Starttag der lokalen Woche (Montag, Sonntag und mehr).
DayOfWeek firstDayOfWeek = WeekFields.of(locale).getFirstDayOfWeek();
LocalDate firstDay = today.with(TemporalAdjusters.previousOrSame(firstDayOfWeek));
*only serve as memo so actual syntax may break
Recommended Posts