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

Method apply

base/src/main/java/net/time4j/Moment.java:3237–3255  ·  view source on GitHub ↗
(Moment timepoint)

Source from the content-addressed store, hash-verified

3235 //~ Methoden ------------------------------------------------------
3236
3237 @Override
3238 public Moment apply(Moment timepoint) {
3239
3240 LeapSeconds ls = LeapSeconds.getInstance();
3241
3242 if (ls.isEnabled()) {
3243 long utc = timepoint.getElapsedTime(TimeScale.UTC);
3244 LeapSecondEvent event = ls.getNextEvent(utc);
3245
3246 if (event != null) {
3247 PlainTimestamp tsp =
3248 PlainDate.from(event.getDate()).atTime(23, 59, 59);
3249 return tsp.atUTC().plus(event.getShift(), SECONDS);
3250 }
3251 }
3252
3253 return null;
3254
3255 }
3256
3257 }
3258

Callers

nothing calls this directly

Calls 10

getInstanceMethod · 0.95
isEnabledMethod · 0.95
getNextEventMethod · 0.95
fromMethod · 0.95
getDateMethod · 0.95
atUTCMethod · 0.95
getShiftMethod · 0.95
getElapsedTimeMethod · 0.65
atTimeMethod · 0.45
plusMethod · 0.45

Tested by

no test coverage detected