Expand description
Time handling and formatting.
Structsยง
- Locale
Format ๐Cache - Cached locale-specific formatting properties.
- Time
Format - How to format the time stamps.
- Time
Formatter - Formatter for time strings with caching of computed values. Enables efficient formatting of multiple time values with the same timescale and format settings.
- Time
Input State - State for the time input widget.
- Time
Scale
Enumsยง
- Time
String Formatting - How to format the numeric part of the time string.
- Time
Unit
Constantsยง
- DEFAULT_
TIMELINE_ NAME - THIN_
SPACE ๐ - TICK_
STEPS - Candidate multipliers used to choose tick spacing.
Staticsยง
- LOCALE_
FORMAT_ ๐CACHE
Functionsยง
- create_
cache ๐ - find_
auto_ ๐scale - Heuristically find a suitable time unit for the given time.
- format_
locale ๐ - format_
si ๐ - get_
locale_ ๐format_ cache - Get the cached locale formatting properties.
- get_
ticks_ ๐internal - Get suitable tick locations for the current view port. The method is based on guessing the length of the time string and is inspired by the corresponding code in Matplotlib.
- normalize_
numeric_ ๐with_ unit - Convert a numeric string into an integer BigInt and normalized TimeUnit.
- parse_
time_ ๐input - Parse a time string and extract numeric value and unit (if present).
- pow10 ๐
- Helper to compute powers of 10 efficiently. Returns precomputed values for exponents 0-21, or computes on-demand for others.
- split_
and_ ๐format_ number - Format number based on
TimeStringFormatting, i.e., possibly group digits together and use correct separator for each group. - split_
numeric_ ๐parts - Split a numeric string into integer and fractional parts.
- 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_
input_ widget - Render a time input widget in egui.
- time_
string - Format the time string taking all settings into account.
This function delegates to
TimeFormatterwhich handles the Auto timeunit. - timeformat_
menu - Draw the menu for selecting the time format.
- timeunit_
menu - Create menu for selecting preferred time unit.