Expand description
Pretty_duration takes a Duration
and output a String
in prettier way that make
sense for a human being.
Provide customization with a short and long format. There is an optional configuration to override terms for each time bins (year, month, day, hour, minute, second, millisecond) allowing people using the library from a different language to adapt the output 1.
The library let you specify the singular and plural form providing flexibility for language that must have special rule. For example, the French word for month is
mois
with an ending end for the singular and plural form. ↩
Structs§
- Duration
Bins - Pretty
Duration Labels - Structure that hold the text to display for the singular and plural form of each unit
- Pretty
Duration Options - Options to customize the output String
Enums§
Functions§
- pretty_
duration - Main function of the pretty-duration library that takes a required std::time::Duration and and optional PrettyDurationOptions.