MCPcopy Index your code
hub / github.com/apache/groovy / getNow

Method getNow

src/main/java/groovy/time/Duration.java:180–192  ·  view source on GitHub ↗

Returns the date obtained by adding this duration to today. @return the computed date

()

Source from the content-addressed store, hash-verified

178 * @return the computed date
179 */
180 @Override
181 public Date getNow() {
182 final Calendar cal = Calendar.getInstance();
183
184 cal.add(Calendar.DAY_OF_YEAR, Duration.this.getDays());
185
186 cal.set(Calendar.HOUR_OF_DAY, 0);
187 cal.set(Calendar.MINUTE, 0);
188 cal.set(Calendar.SECOND, 0);
189 cal.set(Calendar.MILLISECOND, 0);
190
191 return new Date(cal.getTimeInMillis());
192 }
193 };
194 }
195}

Callers 2

bindMethod · 0.45
toStringMethod · 0.45

Calls 4

getInstanceMethod · 0.65
addMethod · 0.65
getDaysMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected