MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / checkAndCastDay

Method checkAndCastDay

src/main/java/com/amazon/ion/Timestamp.java:2909–2917  ·  view source on GitHub ↗
(int day, int year, int month)

Source from the content-addressed store, hash-verified

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 {

Callers 3

TimestampMethod · 0.95

Calls 1

last_day_in_monthMethod · 0.95

Tested by

no test coverage detected