Java Date to Day getDay(Date date)

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

Description

get Day

License

Apache License

Declaration

public static Integer getDay(Date date) 

Method Source Code


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

import static java.util.Calendar.*;

import java.util.*;

public class Main {
    public static Integer getDay(Date date) {
        if (date == null) {
            return null;
        }//  w w  w . j  a v a 2 s. c  o m

        Calendar ca = Calendar.getInstance();
        ca.setTime(date);
        return Integer.valueOf(ca.get(DAY_OF_MONTH));
    }
}

Related

  1. getDay(Date d)
  2. getDay(Date date)
  3. getDay(Date date)
  4. getDay(Date date)
  5. getDay(Date date)
  6. getDay(Date date)
  7. getDay(Date date)
  8. getDay(Date date)
  9. getDay(Date date)