> For the complete documentation index, see [llms.txt](https://learnpython.strivemath.com/p5-python-web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learnpython.strivemath.com/p5-python-web/reference/built-in-functions/hour.md).

# hour()

### Example

<figure><img src="/files/vE5olq6R0BE48KcyDE5J" alt=""><figcaption></figcaption></figure>

```python
text('Current Hour:',200,250)
text(hour(), width/2, height/2)
```

### Syntax

```
hour()
```

### Description

It returns the **current hour** of the day as an integer, ranging from **0 to 23**.

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
