Here you can find the source of day2date(int day, Calendar cal)
public static Calendar day2date(int day, Calendar cal)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static Calendar day2date(int day, Calendar cal) { cal.clear();//from w ww .j a v a2 s . co m cal.set(Calendar.YEAR, day / 10000); cal.set(Calendar.MONTH, (day % 10000) / 100 - 1); cal.set(Calendar.DAY_OF_MONTH, day % 100); return cal; } }