Here you can find the source of getCalendar(long millis)
Parameter | Description |
---|---|
millis | a parameter |
public static Calendar getCalendar(long millis)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { public static Calendar getCalendar(long millis) { Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(millis);/*from ww w .ja va 2s . co m*/ return cal; } public static Calendar getCalendar(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal; } }