Here you can find the source of isEndOfMonth(Date nowday)
public static boolean isEndOfMonth(Date nowday)
//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 nowday) { Calendar ca = Calendar.getInstance(); ca.setTime(nowday);/*from w ww .j a va2 s .c om*/ if (ca.get(Calendar.DATE) == ca.getActualMaximum(Calendar.DAY_OF_MONTH)) return true; else return false; } public static boolean isEndOfMonth() { Calendar ca = Calendar.getInstance(); ca.setTime(getCurrentDate_Date()); if (ca.get(Calendar.DATE) == ca.getActualMaximum(Calendar.DAY_OF_MONTH)) return true; else return false; } public static Date getCurrentDate_Date() { return new Date(System.currentTimeMillis()); } }