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

Method adjustDay

src/main/java/com/amazon/ion/Timestamp.java:2571–2575  ·  view source on GitHub ↗

Returns a timestamp relative to this one by the given number of days. This method always returns a Timestamp with the same precision as the original. For example, adjusting 2012-04T by one day results in 2012-04T; adjusting 2012-04-01T by -1 days results in {@code 2012-03

(int amount)

Source from the content-addressed store, hash-verified

2569 * @param amount a number of days.
2570 */
2571 public final Timestamp adjustDay(int amount)
2572 {
2573 long delta = (long) amount * 24 * 60 * 60 * 1000;
2574 return adjustMillis(delta);
2575 }
2576
2577 /**
2578 * Returns a timestamp relative to this one by the given number of days.

Calls 1

adjustMillisMethod · 0.95