Here you can find the source of getTotalMonths(long time)
public static long getTotalMonths(long time)
//package com.java2s; //License from project: Open Source License public class Main { public static int daysInMonth = 28, monthsInYear = 12, daysInYear = daysInMonth * monthsInYear; public static long getTotalMonths(long time) { return time / daysInMonth; }/* ww w. ja v a2 s . com*/ }