1 | # hour
|
2 |
|
3 | ```js
|
4 | // usage
|
5 | chance.hour()
|
6 | chance.hour({twentyfour: true})
|
7 | ```
|
8 |
|
9 | Generate a random hour
|
10 |
|
11 | ```js
|
12 | chance.hour();
|
13 | => 9
|
14 | ```
|
15 |
|
16 | By default, returns an hour from 1 to 12 for a standard [12-hour clock][12h].
|
17 |
|
18 | Can optionally specify a full twenty-four.
|
19 |
|
20 | ```js
|
21 | chance.hour({twentyfour: true});
|
22 | => 21
|
23 | ```
|
24 |
|
25 | This will return an hour from 1 to 24.
|
26 |
|
27 | [12h]: https://en.wikipedia.org/wiki/12-hour_clock
|