Java Week Day getWeekDayNUM()

Here you can find the source of getWeekDayNUM()

Description

get Week Day NUM

License

Apache License

Declaration

public static int getWeekDayNUM() 

Method Source Code

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

import java.util.Calendar;

public class Main {
    public final static Calendar car = Calendar.getInstance();

    public static int getWeekDayNUM() {
        car.setTimeInMillis(System.currentTimeMillis());
        return (car.get(Calendar.DAY_OF_WEEK) - 1) == 0 ? 7 : (car.get(Calendar.DAY_OF_WEEK) - 1);
    }/* w  ww.  java2 s .c  o m*/
}

Related

  1. getWeekDayCN()
  2. getWeekdayForInt(int value)
  3. getWeekdayName(Date date)
  4. getWeekdayNames()
  5. getWeekdayNames(Locale locale)
  6. getWeekdayOfDateTime(String datetime)
  7. getWeekdays(DateFormatSymbols symbols)
  8. getWeekDayStr(int dayInWeek)
  9. getWeekendDays(Locale locale)