Java tutorial
import java.time.DayOfWeek; import java.time.LocalDate; import java.time.temporal.TemporalAdjusters; public class Main { public static void main(String[] argv) { DayOfWeek d = LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).getDayOfWeek(); System.out.println(d); } }