Java Week Day isWeekendToday()

Here you can find the source of isWeekendToday()

Description

is Weekend Today

License

Open Source License

Declaration

public static boolean isWeekendToday() 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static boolean isWeekendToday() {
        Calendar calendar = Calendar.getInstance();
        int week = calendar.get(Calendar.DAY_OF_WEEK);
        return week == 1 || week == 7;
    }/* w ww  .j a  v  a 2s .  c om*/
}

Related

  1. isDayOfWeek(String str, int dayOfWeek)
  2. isFirseDayOfCurrentWeek(Date date)
  3. isoDayOfWeek(int javaDayOfWeek)
  4. isWeekday(String dateStr, String format)
  5. isWeekendDay(String strDay, DateFormat dateFormatter)
  6. lastDayOfWeek(int year, int month)
  7. nextDayAndHour(int dayOfTheWeek, int hour)
  8. nextTwoWeeksFromToday()
  9. nextWeekday(int weekday, int hour, int minute, int second)