Java Date and Time

  • + 0 comments
    public static String findDay(int month, int day, int year) {
    
        LocalDate date = LocalDate.of(year, month, day);
    
        DayOfWeek dayOfWeek = date.getDayOfWeek();
        String dayOfWeekName = dayOfWeek.getDisplayName(TextStyle.FULL, Locale.ENGLISH);
    
        return dayOfWeekName.toUpperCase();
    
    }