Lingua::EN::Number::Format::MixWithWords - Format number to a mixture of numbers and words (e.g. 12.3 million)
This document describes version 0.08 of Lingua::EN::Number::Format::MixWithWords (from Perl distribution Lingua-EN-Number-Format-MixWithWords), released on 2016-06-14.
use Lingua::EN::Number::Format::MixWithWords qw(format_number_mix); print format_number_mix(num => 1.23e7); # prints "12.3 million"
This module formats number with English names of large numbers (thousands, millions, billions, and so on), e.g. 1.23e7 becomes "12.3 million". If number is too small or too large so it does not have any appropriate names, it will be formatted like a normal number.
Format number to a mixture of numbers and words (e.g. 12.3 million).
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
Number must be larger than this to be formatted as mixture of number and word.
Whether smaller number can be formatted with 0,x.
If min_fraction is 1 (the default) or 0.9, 800000 won't be formatted as 0.9 omillion but will be if min_fraction is 0.8.
The input number to format.
Number of decimal points to round.
Can be negative, e.g. -1 to round to nearest 10, -2 to nearest 100, and so on.
Pick long or short scale names.
Return value: (any)
Please visit the project's homepage at https://metacpan.org/release/Lingua-EN-Number-Format-MixWithWords.
Source repository is at https://github.com/perlancar/perl-Lingua-EN-Number-Format-MixWithWords.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Lingua-EN-Number-Format-MixWithWords
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2016 by email@example.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.