Android Date Get getYear(Date date)

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

Description

get Year

Declaration

public static int getYear(Date date) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static int getYear(Date date) {
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(date);//  w ww.ja va  2s  .c  o m
        return calendar.get(Calendar.YEAR);
    }
}

Related

  1. getDaysOfCurMonth()
  2. getDaysOfCurMonth(final String time)
  3. getMonth(Date date)
  4. getTomorrowAtEight()
  5. getWeekOfDate(Date dt)
  6. getDateObj()
  7. getDate(int year, int month, int date, int hourOfDay, int minute, int second)
  8. getCurrentDateYearMonthDateHourMinuteSecond()
  9. createDate(final int month, final int day, final int year)