You are viewing a single comment's thread. Return to all comments →
From my HackerRank solutions.
import java.time.LocalDate; public static String getDay(String day, String month, String year) { int d = Integer.valueOf(day); int m = Integer.valueOf(month); int y = Integer.valueOf(year); LocalDate date = LocalDate.of(y, m, d); return date.getDayOfWeek().toString(); }
Java Date and Time
You are viewing a single comment's thread. Return to all comments →
Java solution - passes 100% of test cases
From my HackerRank solutions.