Android examples for java.util:Month
get Current Month as int value
//package com.java2s; import java.util.Calendar; public class Main { public static int getCurrentMonth() { Calendar cal = Calendar.getInstance(); int year = cal.get(Calendar.YEAR); int mouth = cal.get(Calendar.MONTH); int day = cal.get(Calendar.DATE); int currentIndex = (year - 1970) * 12 + mouth; return currentIndex; }/* w w w. ja v a2 s .com*/ }