Here you can find the source of getDay(long dateTimeMillis)
public static int getDay(long dateTimeMillis)
//package com.java2s; import java.text.SimpleDateFormat; public class Main { public static int getDay(long dateTimeMillis) { SimpleDateFormat format = new SimpleDateFormat("dd"); StringBuilder dateString = new StringBuilder( format.format(dateTimeMillis)); return Integer.parseInt(dateString.toString()); }/* w ww . ja v a 2 s . com*/ }