package leetcode;

/**
 * https://leetcode.com/problems/day-of-the-week/
 */
public class Problem1185 {
    public String dayOfTheWeek(int day, int month, int year) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1185 prob = new Problem1185();
        System.out.println(prob.dayOfTheWeek(31, 8, 2019)); // "Saturday"
        System.out.println(prob.dayOfTheWeek(18, 7, 1999)); // "Sunday"
        System.out.println(prob.dayOfTheWeek(15, 8, 1993)); // "Sunday"
    }
}

@@ -12,16 +12,105 @@
 tcode;%0A%0A
+import java.time.LocalDate;%0Aimport java.time.format.TextStyle;%0Aimport java.util.Locale;%0A%0A
 /**%0A * h
@@ -261,208 +261,56 @@
     
-// TODO%0A        return null;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem1185 prob = new Problem1185();%0A        Sys
+LocalDate date = LocalDa
 te
-m
 .o
-ut.println(prob.dayOfTheWeek(31, 8, 2019)); // %22Saturday%22
+f(year, month, day);
 %0A   
@@ -318,143 +318,87 @@
     
-System.out.println(prob.d
+return date.getD
 ayOf
-The
 Week(
-18, 7, 1999)); // %22Sunday%22%0A        System.out.println(prob.dayOfTheWeek(15, 8, 1993)); // %22Sunday%22
+).getDisplayName(TextStyle.FULL, Locale.getDefault());
 %0A   

Solve problem 1185