Android Year Get getYearByMillis(long millis)

Here you can find the source of getYearByMillis(long millis)

Description

get Year By Millis

Declaration

public static int getYearByMillis(long millis) 

Method Source Code

//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*/
}

Related

  1. getCurrentYear()
  2. getBeforeYear()
  3. isInCurrentYear(long lTime)
  4. getCurrentYear()
  5. getYear()