Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static final int getMonthByMill(long mill) { Date curDate = new Date(mill); Calendar calendar = Calendar.getInstance(); calendar.setTime(curDate); return calendar.get(java.util.Calendar.MONTH) + 1; } }