Here you can find the source of getLastDayOfCurrentYear()
public static Date getLastDayOfCurrentYear()
//package com.java2s; /*/*from www. ja va 2s . c o m*/ * File: $RCSfile$ * * Copyright (c) 2005 Wincor Nixdorf International GmbH, * Heinz-Nixdorf-Ring 1, 33106 Paderborn, Germany * All Rights Reserved. * * This software is the confidential and proprietary information * of Wincor Nixdorf ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered * into with Wincor Nixdorf. */ import java.util.Date; import java.util.Calendar; public class Main { /** * Return first day of current year * * @return first day value of year of current date */ public static Date getLastDayOfCurrentYear() { Calendar cal = Calendar.getInstance(); cal.set(Calendar.MONTH, 11); cal.set(Calendar.DAY_OF_MONTH, 31); return cal.getTime(); } }