Skip to main content

hour

Function hour 

Source
pub fn hour() -> String
Available on crate feature datetime only.
Expand description

Generate a random hour.

A returns a valid number for an hour as a string. Values range from 0-23.

§Example

let hour = mockd::datetime::hour();

println!("Hour: {}", hour);

§Feature

Requires the “datetime” feature.