Java Year From getYearFirst(int year)

Here you can find the source of getYearFirst(int year)

Description

get Year First

License

Apache License

Declaration

public static Date getYearFirst(int year) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static Date getYearFirst(int year) {
        Calendar calendar = Calendar.getInstance();
        calendar.clear();//from   w  ww . j av a  2 s. c  om
        calendar.set(Calendar.YEAR, year);
        Date currYearFirst = calendar.getTime();
        return currYearFirst;
    }
}

Related

  1. getYear(boolean fourDigit)
  2. getYear(int num)
  3. getYear(long t)
  4. getYearBegin(int year)
  5. getYearFormat(String dateString)
  6. getYearFromDay(int days)
  7. getYearFromISODate(String isoDate)
  8. getYearFromTimestamp(long ms)