Module time

Source
Expand description

Time handling and formatting.

Structs§

TimeFormat
How to format the time stamps.
TimeScale

Enums§

TimeStringFormatting
How to format the numeric part of the time string.
TimeUnit

Constants§

DEFAULT_TIMELINE_NAME
THIN_SPACE 🔒

Functions§

find_auto_scale 🔒
Heuristically find a suitable time unit for the given time.
split_and_format_number 🔒
Format number based on TimeStringFormatting, i.e., possibly group digits together and use correct separator for each group.
strip_trailing_zeros_and_period 🔒
Get rid of trailing zeros if the string contains a ., i.e., being fractional If the resulting string ends with ., remove that as well.
time_string
Format the time string taking all settings into account.
timeformat_menu
Draw the menu for selecting the time format.
timeunit_menu
Create menu for selecting preferred time unit.