Java Day of Week getIntervalIncludeWeekend(Date date)

Here you can find the source of getIntervalIncludeWeekend(Date date)

Description

get Interval Include Weekend

License

Open Source License

Declaration

public static int getIntervalIncludeWeekend(Date date) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static int getIntervalIncludeWeekend(Date date) {
        Calendar now = Calendar.getInstance();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);// w  ww. j  a v  a 2  s  .c  om
        int d = (int) ((now.getTimeInMillis() - calendar.getTimeInMillis()) / (24 * 60 * 60 * 1000));
        return d;
    }
}

Related

  1. getFirstDayOfWeek(int year, int week)
  2. getFirstDayWeekly(final int year)
  3. getFirstMonthWeek(Date month)
  4. getFirstWeekdayBetween(Date fromDate, Date toDate, int dayOfWeek)
  5. getFirstWeekofMonth(Date date1)
  6. getISO8601WeekOfYear(Date date)
  7. getIsoDayOfWeek(Date date)
  8. getIsoWeek(java.util.Date date)
  9. getLastDayFromLastWeek(Date d)