get Day from Date - Android java.util

Android examples for java.util:Day

Description

get Day from Date

Demo Code


//package com.java2s;

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

public class Main {
    public static int getDay(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);//from w  w w.  j  a va2 s  .  com
        return c.get(Calendar.DATE);
    }
}

Related Tutorials