Here you can find the source of getYearByMillis(long millis)
public static int getYearByMillis(long millis)
//package com.java2s; import java.util.Calendar; public class Main { public static int getYearByMillis(long millis) { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(millis); return calendar.get(Calendar.YEAR); }/*from ww w .ja v a 2 s.co m*/ }