Java Calendar Create getCalendar(long millis)

Here you can find the source of getCalendar(long millis)

Description

get Calendar

License

Open Source License

Parameter

Parameter Description
millis a parameter

Return

TODO

Declaration

public static Calendar getCalendar(long millis) 

Method Source Code

//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;
    }
}

Related

  1. getCalendar(int year, int month, int day)
  2. getCalendar(int year, int month, int day, int hour, int min, int sec, String timezone)
  3. getCalendar(int year, int month, int day, int hour, int mins, int secs)
  4. getCalendar(int year, int month, int day, int hours, int minutes, int seconds, TimeZone tz)
  5. getCalendar(int year, int month, int day, TimeZone timeZone)
  6. getCalendar(long millis)
  7. getCalendar(long time)
  8. getCalendar(long timeInMillis)
  9. getCalendar(long timeInMillis)