From: Aarni Koskela Date: Tue, 25 Jan 2022 13:50:12 +0000 (+0200) Subject: Improve number formatting example X-Git-Tag: v2.10.0~23^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=381557db365a7e4b3bac66a1f7c23c589b20773c;p=thirdparty%2Fbabel.git Improve number formatting example Fixes #575 --- diff --git a/docs/numbers.rst b/docs/numbers.rst index 058d79e1..ed3b60f1 100644 --- a/docs/numbers.rst +++ b/docs/numbers.rst @@ -18,13 +18,16 @@ Examples: .. code-block:: pycon + # Numbers with decimal places >>> format_decimal(1.2345, locale='en_US') u'1.234' >>> format_decimal(1.2345, locale='sv_SE') u'1,234' + # Integers with thousand grouping >>> format_decimal(12345, locale='de_DE') u'12.345' - + >>> format_decimal(12345678, locale='de_DE') + u'12.345.678' Pattern Syntax ==============