# Google API Common Protos Client - Class TimeOfDay (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos Client class TimeOfDay.

Represents a time of day. The date and time zone are either not significant
or are specified elsewhere. An API may choose to allow leap seconds. Related
types are [google.type.Date](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date) and
`google.protobuf.Timestamp`.

Generated from protobuf message `google.type.TimeOfDay`

## Namespace

Google \\ Type

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ hours` | `int` Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
| `↳ minutes` | `int` Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59. |
| `↳ seconds` | `int` Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds. |
| `↳ nanos` | `int` Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. |

### getHours

Hours of a day in 24 hour format. Must be greater than or equal to 0 and
typically must be less than or equal to 23. An API may choose to allow the
value "24:00:00" for scenarios like business closing time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setHours

Hours of a day in 24 hour format. Must be greater than or equal to 0 and
typically must be less than or equal to 23. An API may choose to allow the
value "24:00:00" for scenarios like business closing time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMinutes

Minutes of an hour. Must be greater than or equal to 0 and less than or
equal to 59.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setMinutes

Minutes of an hour. Must be greater than or equal to 0 and less than or
equal to 59.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSeconds

Seconds of a minute. Must be greater than or equal to 0 and typically must
be less than or equal to 59. An API may allow the value 60 if it allows
leap-seconds.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setSeconds

Seconds of a minute. Must be greater than or equal to 0 and typically must
be less than or equal to 59. An API may allow the value 60 if it allows
leap-seconds.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNanos

Fractions of seconds, in nanoseconds. Must be greater than or equal to 0
and less than or equal to 999,999,999.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setNanos

Fractions of seconds, in nanoseconds. Must be greater than or equal to 0
and less than or equal to 999,999,999.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |