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

Method adjustHour

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

Returns a timestamp relative to this one by the given number of hours. This method always returns a Timestamp with the same precision as the original. For example, adjusting 2012-04-01T by one hour results in 2012-04-01T; adjusting 2012-04-01T00:00-00:00 by -1 hour result

(int amount)

Source from the content-addressed store, hash-verified

2536 * @param amount a number of hours.
2537 */
2538 public final Timestamp adjustHour(int amount)
2539 {
2540 long delta = (long) amount * 60 * 60 * 1000;
2541 return adjustMillis(delta);
2542 }
2543
2544 /**
2545 * Returns a timestamp relative to this one by the given number of hours.

Calls 1

adjustMillisMethod · 0.95