Java - Get the date for the second Friday of month after 3 months and 14 days from today

Description

Get the date for the second Friday of month after 3 months and 14 days from today

Demo

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;

public class Main {
  public static void main(String[] args) {
    LocalDate date = LocalDate.now().plusMonths(3).plusDays(14)
        .with(TemporalAdjusters.dayOfWeekInMonth(2, DayOfWeek.FRIDAY));

    System.out.println(date);//w w  w  .ja  v  a  2s. co m

  }
}

Result

Related Topic