Java Calendar from Date dateToCalendar(Date date)

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

Description

date To Calendar

License

BSD License

Declaration

public static Calendar dateToCalendar(Date date) 

Method Source Code

//package com.java2s;
//License from project: BSD License 

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

import java.util.Locale;

public class Main {
    public static Calendar dateToCalendar(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);// ww w .  j  a v  a 2  s  .c o m
        return cal;
    }

    public static Calendar dateToCalendar(Date date, Locale locale) {
        Calendar cal = Calendar.getInstance(locale);
        cal.setTime(date);
        return cal;
    }
}

Related

  1. Date2Calendar(Date inDate)
  2. dateToCalendar(Date d)
  3. dateToCalendar(Date d)
  4. dateToCalendar(Date date)
  5. dateToCalendar(Date date)
  6. dateToCalendar(int year, int month, int day)
  7. dateToCalendar(java.util.Date date)
  8. DateToCalendar(java.util.Date date)
  9. dateToCalendar(String date)