Java Month getMonthInEnglish(int month)

Here you can find the source of getMonthInEnglish(int month)

Description

get Month In English

License

Apache License

Declaration

public static String getMonthInEnglish(int month) 

Method Source Code

//package com.java2s;
/*  //from   w ww .  j a v a2 s  .c o  m
    
Copyright [2013-2014] eBay Software Foundation
    
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    
http://www.apache.org/licenses/LICENSE-2.0
    
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
    
*/

public class Main {
    public static String getMonthInEnglish(int month) {

        switch (month) {
        case 0:
            return "January";
        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 "";

    }
}

Related

  1. getMonthDescription(int month)
  2. getMonthDiff(String startDate, String endDate)
  3. getMonthEnd(String strdate)
  4. getMonthFromDate(String date)
  5. getMonthFromYM(String ym)
  6. getMonthLastDate(int month, int year)
  7. getMonthLength(final int year, final int month)
  8. getMonthLength(int year, int m)
  9. getMonthLength(int year, int month)