Check out example codes for "convert date to calendar java". It will help you in understanding the concepts better.

Code Example 1

public static Calendar toCalendar(Date date){ 
  Calendar cal = Calendar.getInstance();
  cal.setTime(date);
  return cal;
}

Learn ReactJs, React Native from akashmittal.com