Java Year Current getCurrYearFirst()

Here you can find the source of getCurrYearFirst()

Description

get Curr Year First

License

Apache License

Declaration

public static Date getCurrYearFirst() 

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 getCurrYearFirst() {
        Calendar currCal = Calendar.getInstance();
        int currentYear = currCal.get(Calendar.YEAR);
        return getYearFirst(currentYear);
    }/*  ww w . j a va 2 s.  c om*/

    public static Date getYearFirst(int year) {
        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(Calendar.YEAR, year);
        Date currYearFirst = calendar.getTime();
        return currYearFirst;
    }
}

Related

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