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 int getYear(Date date) {
        return getCalendar(date).get(Calendar.YEAR);
    }/*from   www . ja v  a2s  .  c  om*/

    public static Calendar getCalendar(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar;
    }
}

Related

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