Java Calendar from Date dateToCalendar(int year, int month, int day)

Here you can find the source of dateToCalendar(int year, int month, int day)

Description

date To Calendar

License

Open Source License

Declaration

public static Calendar dateToCalendar(int year, int month, int day) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {
    public static Calendar dateToCalendar(int year, int month, int day) {
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.MONTH, month - 1);
        cal.set(Calendar.DATE, day);
        cal.set(Calendar.YEAR, year);

        return cal;
    }/*from  w  ww .  j  a v  a 2 s.  c o m*/
}

Related

  1. dateToCalendar(Date d)
  2. dateToCalendar(Date d)
  3. dateToCalendar(Date date)
  4. dateToCalendar(Date date)
  5. dateToCalendar(Date date)
  6. dateToCalendar(java.util.Date date)
  7. DateToCalendar(java.util.Date date)
  8. dateToCalendar(String date)
  9. getCalendar(Date date)