Java Year Get getYear(Date date)

Here you can find the source of getYear(Date date)

Description

get Year

License

Open Source License

Declaration

public static int getYear(Date date) 

Method Source Code

//package com.java2s;
import java.util.*;

public class Main {
    public static Calendar calendar = new GregorianCalendar();

    public static int getYear(Date date) {
        calendar.setTime(date);/*from w w w . ja  v  a2 s .co  m*/
        return calendar.get(Calendar.YEAR);
    }
}

Related

  1. getYear()
  2. getYear()
  3. getYear()
  4. getYear()
  5. getYear(Date d)
  6. getYear(Date date)
  7. getYear(Date date)
  8. getYear(Date date)
  9. getYear(Date date)