Here you can find the source of getMonthOfYear(long time)
public static int getMonthOfYear(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 int getMonthOfYear(long time) { return (int) (getTotalMonths(time) % monthsInYear); }/*ww w . java 2 s.c om*/ public static long getTotalMonths(long time) { return time / daysInMonth; } }