Java Day of Week getWeekChineseIndex(Date curDate)

Here you can find the source of getWeekChineseIndex(Date curDate)

Description

get Week Chinese Index

License

Open Source License

Declaration

public static int getWeekChineseIndex(Date curDate) 

Method Source Code

//package com.java2s;

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

public class Main {

    public static int getWeekChineseIndex(Date curDate) {
        Calendar c = Calendar.getInstance();
        c.setTime(curDate);/*from ww  w .  j  a  v a  2 s  .  co m*/
        int i = c.get(Calendar.DAY_OF_WEEK);
        int s = 0;
        if (i == 1) {
            s = 7;
        } else {
            s = i - 1;
        }
        return s;
    }
}

Related

  1. getWeek(Date today)
  2. getWeek(java.util.Date date)
  3. getWeek(java.util.Date today)
  4. getWeekBegin(Date date)
  5. getWeekCategory(final Date date)
  6. getWeekDate(String date)
  7. getWeekDateList(Date today, int index)
  8. getWeekday(Date d)
  9. getWeekDay(Date d)