rollHourOfDay()

Adds the specified (signed) amount to the Hour of Day field, without changing larger fields.

Syntax

Calendar rollHourOfDay(Numeric amount)
  1. amount is the signed amount to add to the Hour of Day field.

Usage

For example, to roll the Hour of Day field up by one hour, you can achieve it by calling rollHourOfDay(1). When rolling on the Hour of Day field, it will roll the hour value in the range between 0 and 23, which is zero-based.