Here you can find the source of dateToCalendar(Date date)
Parameter | Description |
---|---|
date | The Date object. |
private static Calendar dateToCalendar(Date date)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { /**// w ww .ja va 2 s. co m * Convert the given Date object to a Calendar instance. * * @param date * The Date object. * @return The Calendar instance. */ private static Calendar dateToCalendar(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); return cal; } }