Here you can find the source of getMonthDescription(int month)
public static String getMonthDescription(int month)
//package com.java2s; public class Main { public static String getMonthDescription(int month) { return getMonthDescription(month, 0); }/*w w w .j av a2 s . c o m*/ public static String getMonthDescription(int month, int cutOf) { switch (month) { case 0: return "January".substring(0, cutOf == 0 || cutOf > "January".length() ? "January".length() : cutOf); case 1: return "February".substring(0, cutOf == 0 || cutOf > "February".length() ? "February".length() : cutOf); case 2: return "March".substring(0, cutOf == 0 || cutOf > "March".length() ? "March".length() : cutOf); case 3: return "April".substring(0, cutOf == 0 || cutOf > "April".length() ? "April".length() : cutOf); case 4: return "May".substring(0, cutOf == 0 || cutOf > "May".length() ? "May".length() : cutOf); case 5: return "June".substring(0, cutOf == 0 || cutOf > "June".length() ? "June".length() : cutOf); case 6: return "July".substring(0, cutOf == 0 || cutOf > "July".length() ? "July".length() : cutOf); case 7: return "August".substring(0, cutOf == 0 || cutOf > "August".length() ? "August".length() : cutOf); case 8: return "September".substring(0, cutOf == 0 || cutOf > "September".length() ? "September".length() : cutOf); case 9: return "October".substring(0, cutOf == 0 || cutOf > "October".length() ? "October".length() : cutOf); case 10: return "November".substring(0, cutOf == 0 || cutOf > "November".length() ? "November".length() : cutOf); case 11: return "December".substring(0, cutOf == 0 || cutOf > "December".length() ? "December".length() : cutOf); default: return ""; } } }