Java tutorial
import java.time.DayOfWeek; import java.time.LocalDate; public class Main { public static void main(String[] args) { LocalDate date = LocalDate.of(2014, 2, 15); // 2014-06-15 DayOfWeek dayOfWeek = date.getDayOfWeek(); int dayOfWeekIntValue = dayOfWeek.getValue(); // 6 String dayOfWeekName = dayOfWeek.name(); // SATURDAY System.out.println(dayOfWeekIntValue); System.out.println(dayOfWeekName); } }