Java Weekend IsWeekEnd(GregorianCalendar aInCal)

Here you can find the source of IsWeekEnd(GregorianCalendar aInCal)

Description

Is Week End

License

Open Source License

Declaration

public static boolean IsWeekEnd(GregorianCalendar aInCal) 

Method Source Code

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

import java.util.*;

public class Main {
    public static boolean IsWeekEnd(GregorianCalendar aInCal) {

        String lDayName = aInCal.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT, Locale.getDefault());

        if (Objects.equals(lDayName, new String("Sun")) || (Objects.equals(lDayName, new String("Sat")))) {
            return true;
        }/*w  ww. ja  v  a  2 s  .c  o m*/
        return false;
    }
}

Related

  1. isWeekend(Calendar calendar)
  2. isWeekend(Calendar dateCal)
  3. isWeekend(Date date)
  4. isWeekend(Date date)
  5. isWeekEnd(Date datum)
  6. isWeekend(String date)
  7. isWeekend(String date)
  8. isWeekend(String date)
  9. isWeekend(String dateStr)