(int day, int year, int month)
| 2907 | } |
| 2908 | |
| 2909 | private static byte checkAndCastDay(int day, int year, int month) |
| 2910 | { |
| 2911 | int lastDayInMonth = last_day_in_month(year, month); |
| 2912 | if (day < 1 || day > lastDayInMonth) { |
| 2913 | throw new IllegalArgumentException(String.format("Day %s for year %s and month %s must be between 1 and %s inclusive", day, year, month, lastDayInMonth)); |
| 2914 | } |
| 2915 | |
| 2916 | return (byte) day; |
| 2917 | } |
| 2918 | |
| 2919 | private static byte checkAndCastHour(int hour) |
| 2920 | { |
no test coverage detected