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 {
    private static final Calendar CALENDAR = new GregorianCalendar();

    public static int getCurrentYear() {
        CALENDAR.setTime(new Date());
        return CALENDAR.get(Calendar.YEAR);
    }/*w w w. j a  v a 2  s.  c o  m*/
}

Related

  1. getCurrentYear()
  2. getCurrentYear()
  3. getCurrentYear()
  4. getBeforeYear()
  5. isInCurrentYear(long lTime)
  6. getYear()
  7. getYearByMillis(long millis)