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

Method adjustMonth

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

Returns a timestamp relative to this one by the given number of months. The day field may be adjusted to account for different month length and leap days. This method always returns a Timestamp with the same precision as the original. For example, adjusting 2011T by one month results in

(int amount)

Source from the content-addressed store, hash-verified

2603 * @param amount a number of months.
2604 */
2605 public final Timestamp adjustMonth(int amount)
2606 {
2607 if (amount == 0) return this;
2608 return addMonthForPrecision(amount, _precision);
2609 }
2610
2611 /**
2612 * Adds the given number of months, extending (if necessary) the resulting Timestamp to the given

Calls 1

addMonthForPrecisionMethod · 0.95