Here you can find the source of isEndOfMonth(Date date)
public static boolean isEndOfMonth(Date date)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { public static boolean isEndOfMonth(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date);//w ww . ja v a 2 s.co m cal.add(Calendar.DAY_OF_MONTH, 1); return 1 == cal.get(Calendar.DAY_OF_MONTH); } }