Android Date to Calendar Convert getCalendarFormDate(Date date)

Here you can find the source of getCalendarFormDate(Date date)

Description

get Calendar Form Date

Declaration

public static Calendar getCalendarFormDate(Date date) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static Calendar getCalendarFormDate(Date date) {
        if (date == null) {
            return null;
        } else {//from   w  w w  .  j a  v  a  2s  .com
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(date);
            return calendar;
        }
    }
}

Related

  1. getCalendarFromDate(Date date)
  2. calendarFromDate(Date d)
  3. calendarDate(Date date)
  4. convert(Date date)
  5. getCalendarField(Date date, int field)