package fr.yunes;

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

public class Date6 {
    public static void main(String []args) {
        LocalDate firstDayOf2019 = LocalDate.ofYearDay(2019,1);
        System.out.println(firstDayOf2019);
        System.out.println("Le premier jour de l'année 2019 était un "+firstDayOf2019.getDayOfWeek());
        LocalDate firstFridayOf2019 = firstDayOf2019.with(TemporalAdjusters.nextOrSame(DayOfWeek.FRIDAY));
        System.out.println("Le premier vendredi de 2019 était le "+firstFridayOf2019);
    }
}