Java Week Day getNextDayOfweek()

Here you can find the source of getNextDayOfweek()

Description

get Next Day Ofweek

License

Apache License

Declaration

public static int getNextDayOfweek() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

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

public class Main {
    private static Date date = new Date();

    public static int getNextDayOfweek() {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new java.util.Date(date.getTime() + 24 * 60 * 60 * 1000));
        if (calendar.get(Calendar.DAY_OF_WEEK) == 1)
            return 7;
        else/*w  ww  . ja  va 2s.  c om*/
            return calendar.get(Calendar.DAY_OF_WEEK) - 1;
    }
}

Related

  1. getMon()
  2. getMonday(String date)
  3. getMonday(String date, int weekDay)
  4. getMondayAfter(Date date)
  5. getMondayOfThisWeek()
  6. getPreDay()
  7. getPreviousDay(long date, int startOfWeek)
  8. getPreviousFriday(String date)
  9. getPreviousMonday(Date date, int days)