Here you can find the source of isEndOfMonth(Date d)
public static boolean isEndOfMonth(Date d)
//package com.java2s; /**/*from w ww .j av a 2s. c o m*/ * Copyright (c) 2012 Todoroo Inc * * See the file "LICENSE" for the full license governing this code. */ import java.util.Calendar; import java.util.Date; public class Main { public static boolean isEndOfMonth(Date d) { int date = d.getDate(); if (date < 28) return false; int month = d.getMonth(); if (month == Calendar.FEBRUARY) return date >= 28; if (month == Calendar.APRIL || month == Calendar.JUNE || month == Calendar.SEPTEMBER || month == Calendar.NOVEMBER) return date >= 30; return date >= 31; } }