Java Day End isEndOfMonth(Date nowday)

Here you can find the source of isEndOfMonth(Date nowday)

Description

is End Of Month

License

Open Source License

Declaration

public static boolean isEndOfMonth(Date nowday) 

Method Source Code

//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());
    }
}

Related

  1. isBetweenDate(Date date, Date startDate, Date endDate)
  2. isBetWeenDates(Date in, Date from, Date to)
  3. isCalenderDaySame(GregorianCalendar aInCal1, GregorianCalendar aInCal2)
  4. isEndOfMonth(Date d)
  5. isEndOfMonth(Date date)
  6. isEndOfSeason(Date date)
  7. isEqualYMD(Date begindate, Date enddate)
  8. isIncludeDay(Date start, Date end, Date target)
  9. isInRange(Date myDate, Date dateStart, Date dateEnd)