How to find the third Friday of the month in Java 8?

I tried to find the question, but the answer does not explain how to do this. Can any body help me with the same?

+4
source share
1 answer

THIRD Friday, December 2016, should be:

LocalDate d = LocalDate.now();
d = d.with(TemporalAdjusters.dayOfWeekInMonth(3, DayOfWeek.FRIDAY));
System.out.println(d); // 2016-12-16
+8
source

Source: https://habr.com/ru/post/1662946/


All Articles