Here you can find the source of getMonth()
public static String getMonth()
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static String getMonth() { Calendar calendar = new GregorianCalendar(); int m = calendar.get(GregorianCalendar.MONTH); switch (m) { case 0:/*from ww w.j ava2 s . c o m*/ return "Jenuary"; case 1: return "February"; case 2: return "March"; case 3: return "April"; case 4: return "May"; case 5: return "June"; case 6: return "July"; case 7: return "August"; case 8: return "September"; case 9: return "October"; case 10: return "November"; case 11: return "December"; } return null; } }