Java Calendar from Date getCalendar(Date inputDate)

Here you can find the source of getCalendar(Date inputDate)

Description

get Calendar

License

Open Source License

Declaration

public static Calendar getCalendar(Date inputDate) 

Method Source Code


//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Calendar getCalendar(Date inputDate) {

        if (inputDate == null)
            return null;

        Calendar calendar = Calendar.getInstance();
        calendar.setTime(inputDate);//w w  w.j a  v a 2  s  .  c o  m

        return calendar;
    }
}

Related

  1. getCalendar(Date date)
  2. getCalendar(Date date, int firstDayOfWeek)
  3. getCalendar(Date date, int step)
  4. getCalendar(Date dt)
  5. getCalendar(Date dt, TimeZone to)