Java tutorial
import java.time.DayOfWeek; import java.time.LocalDate; import java.time.temporal.ChronoField; import java.time.temporal.TemporalAccessor; public class Main { public static void main(String[] args) { LocalDate ld1 = LocalDate.of(2013, 12, 1); Boolean is = ld1.query(Main::queryFrom); System.out.println(is); } public static Boolean queryFrom(TemporalAccessor temporal) { if (temporal.isSupported(ChronoField.DAY_OF_MONTH) && temporal.isSupported(ChronoField.DAY_OF_WEEK)) { int dayOfMonth = temporal.get(ChronoField.DAY_OF_MONTH); int weekDay = temporal.get(ChronoField.DAY_OF_WEEK); DayOfWeek dayOfWeek = DayOfWeek.of(weekDay); if (dayOfMonth == 1 && dayOfWeek == DayOfWeek.MONDAY) { return Boolean.TRUE; } } return Boolean.FALSE; } }