Android examples for java.util:Month
Get current month as String
//package com.java2s; import java.util.Calendar; public class Main { /**/*w w w .j a v a 2s . c om*/ * Get current month * @return month in String format */ public static String currentMonth() { Calendar cal = Calendar.getInstance(); int month = cal.get(Calendar.MONTH) + 1; return String.valueOf(month); } }