Here you can find the source of getIntYear(Calendar c)
public static Integer getIntYear(Calendar c)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Integer getIntYear(Calendar c) { int year = c.get(Calendar.YEAR); return year; }/*from w ww . jav a 2 s. c o m*/ public static Integer getIntYear(Date d) { if (d == null) { return null; } Calendar c = Calendar.getInstance(); c.setTime(d); return getIntYear(c); } }