Java LocalDate Calculate isWeekend(LocalDate date)

Here you can find the source of isWeekend(LocalDate date)

Description

is Weekend

License

Open Source License

Declaration

public static boolean isWeekend(LocalDate date) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.time.DayOfWeek;
import java.time.LocalDate;

public class Main {
    public static boolean isWeekend(LocalDate date) {
        return date.getDayOfWeek() == DayOfWeek.SATURDAY || date.getDayOfWeek() == DayOfWeek.SUNDAY;
    }//from  w w  w  . ja  v a 2s .c o  m
}

Related

  1. isLocalDateAD(LocalDate date)
  2. isLocalDateOrDateTimeType(Class type)
  3. isNotNullAndAfter(LocalDate localDate1, LocalDate localDate2)
  4. isOverlapping(LocalDate firstStartDate, LocalDate firstEndDate, LocalDate secondStartDate, LocalDate secondEndDate)
  5. isValid(LocalDate ld1, LocalDate ld2, ZoneId zid, Predicate test)
  6. isWorkDay(@Nonnull final LocalDate aDate)
  7. lastMonth(LocalDate date)
  8. localDate2ms(final LocalDate ld)
  9. LocalDateFromMilli(long value)