Here you can find the source of getLastDayOfMonth(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static Date getLastDayOfMonth(Date date)
//package com.java2s; /**//from w w w .j a v a 2 s.co m * Copyright (C) 2013 Company. All Rights Reserved. * * This software is the proprietary information of Company . * Use is subjected to license terms. * * @since Jul 17, 2013 11:48:25 PM * @author SPA * */ import java.util.Calendar; import java.util.Date; public class Main { /** * This method is used for getting the last day of the month * * @param date * @return */ public static Date getLastDayOfMonth(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); c.set(Calendar.DATE, c.getActualMaximum(Calendar.DAY_OF_MONTH)); return c.getTime(); } }