method TimeOfDay.fmt
Formats with a pattern (HH:mm); an empty pattern is ISO 8601.
Example:
use std.time { TimeOfDay }
fn main() io {
print(TimeOfDay{ hour: 18, minute: 5 }.fmt("HH:mm"))
}Output
18:05
pub(api) fn fmt(pattern: str) -> strComplexity. O(len(pattern)).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
pattern | str |
Returns
str
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:1225