Here you can find the source of getMonth(long dateTimeMillis)
public static int getMonth(long dateTimeMillis)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; public class Main { public static int getMonth(long dateTimeMillis) { SimpleDateFormat format = new SimpleDateFormat("MM"); StringBuilder dateString = new StringBuilder( format.format(dateTimeMillis)); return Integer.parseInt(dateString.toString()) - 1; }/*from www . ja v a 2s . co m*/ }