Here you can find the source of isDayOfWeek(LocalDate d, DayOfWeek dow)
Parameter | Description |
---|---|
d | a parameter |
dow | a parameter |
public static boolean isDayOfWeek(LocalDate d, DayOfWeek dow) throws Exception
//package com.java2s; //License from project: Open Source License import java.time.*; public class Main { /**/* ww w .j a v a 2 s .c o m*/ * Check the LocalDate given to see if it is the DayOfWeek given * * @param d * @param dow */ public static boolean isDayOfWeek(LocalDate d, DayOfWeek dow) throws Exception { if (d.getDayOfWeek().compareTo(dow) == 0) { return true; } else { return false; } } }