Here you can find the source of month(Calendar calendar)
public static int month(Calendar calendar)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static int month(Calendar calendar) { return calendar.get(Calendar.MONTH) + 1; }/* ww w .ja v a 2s . c o m*/ public static int month() { return Calendar.getInstance().get(Calendar.MONTH) + 1; } }