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

Method adjustYear

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

Returns a timestamp relative to this one by the given number of years. The day field may be adjusted to account for leap days. For example, adjusting 2012-02-29 by one year results in 2013-02-28. Because YEAR is the coarsest precision possible, this method always returns a Timest

(int amount)

Source from the content-addressed store, hash-verified

2648 * @param amount a number of years.
2649 */
2650 public final Timestamp adjustYear(int amount) {
2651 return addYear(amount);
2652 }
2653
2654 /**
2655 * Returns a timestamp relative to this one by the given number of years.

Calls 1

addYearMethod · 0.95