Here you can find the source of date2day(Calendar cal)
public static int date2day(Calendar cal)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static int date2day(Calendar cal) { return cal.get(Calendar.YEAR) * 10000 + (cal.get(Calendar.MONTH) + 1) * 100 + cal.get(Calendar.DAY_OF_MONTH); }//from w ww . jav a 2 s. c om }