Java Year Current getLastDayOfCurrentYear()

Here you can find the source of getLastDayOfCurrentYear()

Description

Return first day of current year

License

Open Source License

Return

first day value of year of current date

Declaration

public static Date getLastDayOfCurrentYear() 

Method Source Code


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

Related

  1. getCurrentYearFirst()
  2. getCurrentYearMonth()
  3. getCurrentYearMonthDay()
  4. getCurrYear()
  5. getCurrYearFirst()
  6. getYear()
  7. getYear()
  8. getYear()
  9. getYear()