Java Calendar Create getCalendar(final long timeInMillis)

Here you can find the source of getCalendar(final long timeInMillis)

Description

get Calendar

License

Open Source License

Declaration

public static Calendar getCalendar(final long timeInMillis) 

Method Source Code


//package com.java2s;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {
    public static Calendar getCalendar(final Date date) {
        final GregorianCalendar cal = new GregorianCalendar();
        cal.setTime(date);//from w w w . jav a 2  s .  c o m
        return cal;
    }

    public static Calendar getCalendar(final long timeInMillis) {
        return getCalendar(new Date(timeInMillis));
    }
}

Related

  1. getCalendar()
  2. getCalendar(boolean skipConversion)
  3. getCalendar(boolean skipConversion)
  4. getCalendar(Calendar cal, int relativeDay)
  5. getCalendar(final Date dateAndTime)
  6. getCalendar(final String isodate)
  7. getCalendar(int d, int m, int y)
  8. getCalendar(int dayOfWeek, int atHour, int atMinute)
  9. getCalendar(int year, int month, int date)