---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Date.prototype.getHours()

The **`getHours()`** method returns the hour for the specified
date, according to local time.

## Syntax

```js
getHours()
```

### Return value

An integer number, between 0 and 23, representing the hour for the given date according
to local time.
