Java Year Current getCurrentYear()

Here you can find the source of getCurrentYear()

Description

get Current Year

License

LGPL

Declaration

public static int getCurrentYear() 

Method Source Code


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

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

public class Main {
    public static int getCurrentYear() {
        Calendar cal = GregorianCalendar.getInstance();
        cal.setTime(new Date());
        int year = cal.get(Calendar.YEAR);
        return year;
    }/*from   www  .ja va  2s. co m*/
}

Related

  1. currentDayForYear(long selectTime)
  2. currentYear()
  3. currentYear()
  4. currentYear()
  5. getCurMonthDayNumber(String strYear, String strMonth)
  6. getCurrentYear()
  7. getCurrentYear()
  8. getCurrentYear()
  9. getCurrentYear()