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

Method addDay

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

Returns a timestamp relative to this one by the given number of days. @param amount a number of days.

(int amount)

Source from the content-addressed store, hash-verified

2580 * @param amount a number of days.
2581 */
2582 public final Timestamp addDay(int amount)
2583 {
2584 long delta = (long) amount * 24 * 60 * 60 * 1000;
2585 return addMillisForPrecision(delta, Precision.DAY, false);
2586 }
2587
2588 // Shifting month and year are more complicated since the length of a month
2589 // varies and we want the day-of-month to stay the same when possible.

Calls 1

addMillisForPrecisionMethod · 0.95