Android examples for java.util:Month
get Month from Date and return int
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static int getMonth(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date);/*from w w w .j a v a 2s . co m*/ return c.get(Calendar.MONTH) + 1; } }