Android Day in Month Get getDayOfWeek(long time)

Here you can find the source of getDayOfWeek(long time)

Description

get Day Of Week

Declaration

public static int getDayOfWeek(long time) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

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

    public static int getDayOfWeek(long time) {
        calendar.clear();/*from  ww w.jav  a 2 s  .  c om*/
        calendar.setTimeInMillis(time);
        int result = calendar.get(Calendar.DAY_OF_WEEK) - 1; 
        if (result <= 0) {
            result = 7;
        }
        return result;
    }
}

Related

  1. daysInMonth(Calendar c)
  2. getNextMonthDays(String argDate)
  3. perMonthDays(Calendar cal)
  4. numDaysToEndOfMonth()
  5. dayNumber(Date date)
  6. getStringDayOfMonth(Date date)
  7. getFirstDayOfMonth(String format)
  8. getFirstDayOfMonth(String format)
  9. getLastDayOfMonth(String format)