Here you can find the source of monthNameAbbrev(int mon)
Parameter | Description |
---|---|
mon | integer from 1 to 12. |
public static String monthNameAbbrev(int mon)
//package com.java2s; /*/* www. jav a2s.c o m*/ * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ public class Main { private final static String[] mons = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" }; /** * returns "jan", "feb", ..., "dec" for month number (1,2,...,12). * @param mon integer from 1 to 12. * @return three character English month name. */ public static String monthNameAbbrev(int mon) { if (mon < 1 || mon > 12) throw new IllegalArgumentException("invalid month number: " + mon); return mons[mon - 1]; } }