Java Day in Month validateMonthDay(int nDate)

Here you can find the source of validateMonthDay(int nDate)

Description

validate Month Day

License

Open Source License

Declaration

static void validateMonthDay(int nDate) 

Method Source Code

//package com.java2s;
/**// w  w w .  jav a2 s.c om
 * Created by Andrew Bell 12/24/2015
 * www.recursivechaos.com
 * andrew@recursivechaos.com
 * Licensed under MIT License 2015. See license.txt for details.
 */

public class Main {
    static void validateMonthDay(int nDate) {
        if ((nDate > 28) || (nDate < 1)) {
            throw new IndexOutOfBoundsException("nDate must be between 1 and 28. " + nDate + " was passed.");
        }
    }
}

Related

  1. monthDays(int y, int m)
  2. numDaysInMonth(int month)
  3. padMonthOrDay(String mod)
  4. toMonthFirstDay(String month)
  5. validateDayOfMonth(int day)
  6. weekOfMonth(int dayCount, int commonMonthIndex)