Java Day in Month getLastDayOfMonth(String monthInitials)

Here you can find the source of getLastDayOfMonth(String monthInitials)

Description

get Last Day Of Month

License

Open Source License

Declaration

public static String getLastDayOfMonth(String monthInitials) 

Method Source Code

//package com.java2s;

public class Main {
    public static String getLastDayOfMonth(String monthInitials) {
        if (monthInitials.equals("Jan"))
            return "31";
        else if (monthInitials.equals("Feb"))
            return "30";
        else if (monthInitials.equals("Mar"))
            return "31";
        else if (monthInitials.equals("Apr"))
            return "30";
        else if (monthInitials.equals("May"))
            return "31";
        else if (monthInitials.equals("Jun"))
            return "30";
        else if (monthInitials.equals("Jul"))
            return "31";
        else if (monthInitials.equals("Aug"))
            return "31";
        else if (monthInitials.equals("Sep"))
            return "30";
        else if (monthInitials.equals("Oct"))
            return "31";
        else if (monthInitials.equals("Nov"))
            return "30";
        else if (monthInitials.equals("Dec"))
            return "31";
        else/*from w ww. jav a  2 s.  c om*/
            return null;
    }
}

Related

  1. getDaysOfMonth(Date startdate, Date enddate, String month)
  2. getFirstDayOfMonth(int year, int month)
  3. getFirstdayOfMonth(String year, String month)
  4. getLastDayInMonth(int month, int year)
  5. getLastDayOfMonth(int year, int month)
  6. getMaxDayByMonth(String month)
  7. getMaxMonthDay(int year, int month)
  8. getMonthDay(int year, int month)
  9. getMonthDayFormats()