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

Method of

base/src/main/java/net/time4j/calendar/SolarTerm.java:297–303  ·  view source on GitHub ↗
(Moment moment)

Source from the content-addressed store, hash-verified

295 * @see JulianDay#MAX
296 */
297 public static SolarTerm of(Moment moment) {
298
299 double jde = JulianDay.ofEphemerisTime(moment).getValue();
300 int angleIndex = (int) Math.floor(solarLongitude(jde) / 15);
301 return ENUMS[(angleIndex + 3) % 24];
302
303 }
304
305 /**
306 * <p>Obtains the associated index according to the traditional order in the Chinese calendar. </p>

Callers 3

getValueMethod · 0.95
getMinimumMethod · 0.95
getMaximumMethod · 0.95

Calls 4

ofEphemerisTimeMethod · 0.95
solarLongitudeMethod · 0.95
floorMethod · 0.80
getValueMethod · 0.65

Tested by

no test coverage detected