Java Day in Month numDaysInMonth(int month)

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

Description

num Days In Month

License

Apache License

Declaration

public static int numDaysInMonth(int month) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int numDaysInMonth(int month) {
        switch (month) {
        case 2://from w ww .j av a  2s  .c o m
            return 28;
        case 4:
        case 6:
        case 9:
        case 11:
            return 30;
        default:
            return 31;
        }
    }
}

Related

  1. isDayMonth(String types)
  2. isDayOfMonth(int num)
  3. isLastDayOfMonth(int day, int month, int year)
  4. maxDayOfMonth(int year, int month)
  5. monthDays(int y, int m)
  6. padMonthOrDay(String mod)
  7. toMonthFirstDay(String month)
  8. validateDayOfMonth(int day)
  9. validateMonthDay(int nDate)