MCPcopy Create free account
hub / github.com/MenoData/Time4J / getMaximum

Method getMaximum

base/src/main/java/net/time4j/Weekmodel.java:1242–1254  ·  view source on GitHub ↗
(T context)

Source from the content-addressed store, hash-verified

1240 }
1241
1242 @Override
1243 public Weekday getMaximum(T context) {
1244
1245 PlainDate date = context.get(CALENDAR_DATE);
1246 int oldNum = date.getDayOfWeek().getValue(this.element.getModel());
1247
1248 if (date.getDaysSinceEpochUTC() + 7 - oldNum > PlainDate.axis().getCalendarSystem().getMaximumSinceUTC()) {
1249 return PlainDate.MAX.getDayOfWeek();
1250 }
1251
1252 return this.element.getDefaultMaximum();
1253
1254 }
1255
1256 @Override
1257 public boolean isValid(

Callers

nothing calls this directly

Calls 10

getDayOfWeekMethod · 0.95
axisMethod · 0.95
getMethod · 0.65
getValueMethod · 0.65
getDaysSinceEpochUTCMethod · 0.65
getMaximumSinceUTCMethod · 0.65
getDefaultMaximumMethod · 0.65
getModelMethod · 0.45
getCalendarSystemMethod · 0.45
getDayOfWeekMethod · 0.45

Tested by

no test coverage detected