Here you can find the source of currentDateTime(long time, int type)
private static int currentDateTime(long time, int type)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { private static int currentDateTime(long time, int type) { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(time);/*from w ww . j a v a 2s . c o m*/ return calendar.get(type); } }