Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static int[] getStartEndDay(Date[] startEnd) { int[] startEndDay = new int[2]; Calendar calendar = Calendar.getInstance(); calendar.setTime(startEnd[0]); startEndDay[0] = calendar.get(Calendar.DAY_OF_MONTH); calendar.setTime(startEnd[1]); startEndDay[1] = calendar.get(Calendar.DAY_OF_MONTH); return startEndDay; } }