UNPKG

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