Skip to main content

Module numfmt

Module numfmt 

Source
Expand description

Number format parser and applier.

Ports the most commonly used parts of Go numfmt.go. It maps built-in number-format IDs to their format strings and can apply many custom format codes for numbers, percentages, scientific notation, fractions, currency, accounting, dates and times.

Statics§

BUILT_IN_NUM_FMT
Built-in number format map (English localization).

Functions§

apply_number_format
Apply a number format to a numeric value.
built_in_num_fmt_code
Return the built-in format code for an ID, if one exists.
format_number
Apply a format code directly to a numeric value without an Excel numFmt ID.
is_date_time_pattern
Check whether a number-format pattern is suitable for use as a date/time pattern.