Documentation ¶
Index ¶
- func FixedMonetaryf(value float64, precision int) string
- func FormatTime(time time.Time, layout string) string
- func Monetaryf(value float64, precision int) string
- func Numericf(value float64, precision int) string
- func Scale(value float64) (float64, string)
- func ScaleNumericf(value float64, digits int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FixedMonetaryf ¶ added in v1.6.10
FixedMonetaryf produces a fixed-precision monetary-value string. See Monetaryf.
func FormatTime ¶
FormatTime is a dropin replacement time.Format(layout) that uses system locale + LC_TIME
func Monetaryf ¶
Monetaryf produces a string from of the given number give minimum precision in base 10 with thousands separators after every three orders of magnitude using thousands and decimal separator according to LC_MONETARY; defaulting "en".
e.g. Monetaryf(834142.3256, 2) -> "834,142.3256"
func Numericf ¶
Numericf produces a string from of the given number with give fixed precision in base 10 with thousands separators after every three orders of magnitude using thousands and decimal separator according to LC_NUMERIC; defaulting "en".
e.g. Numericf(834142.32, 2) -> "834,142.32"
func ScaleNumericf ¶
ScaleNumericf scales a large number down using a suffix, then formats it with the prescribed number of significant digits.
Types ¶
This section is empty.