Android Year Get getCurrentYear()

Here you can find the source of getCurrentYear()

Description

get Current Year

Declaration

public static int getCurrentYear() 

Method Source Code

//package com.java2s;

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

public class Main {
    public static int getCurrentYear() {
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(new Date());
        return calendar.get(Calendar.YEAR);
    }/*from   ww  w  . j av a  2  s.com*/
}

Related

  1. getIndexYear(Date origin, int index)
  2. getCurrentYear()
  3. getCurrentYear()
  4. getBeforeYear()
  5. isInCurrentYear(long lTime)