NAME
Apache::Wyrd::Number - Format Numerals or Translate to Written (English)
SYNOPSIS
There are
<BASENAME::Number>
<BASENAME::Lookup query="select count(stones) from dancers" />
</BASENAME::Number>
stones in the dancers.
DESCRIPTION
NONE
HTML ATTRIBUTES
- translate
-
Translate the number into another symbol-system. Currently only english is supported as an option.
- decimals
-
How many decimals to round the number to (not compatible with translate).
- currency
-
What currency symbol to use to the left of the number. (Not compatible with translate)
- leader
-
string to put to the left of the currency symbol, if applicable.
- tail
-
string to put to the right of the number
- flags
-
- capitalize
-
Capitalize the first letter of a "translated" Number
- commify
-
Put delineators into an "untranslated" Number. Uses the ',' symbol
PERL METHODS
(format: (returns) name (arguments after self))
- (scalar)
_translate
(scalar, scalar) -
Accepts a value and a "mode" string. Based on the mode string, will perform a translation of the number in the mode specified by the translate attribute, as long as the number is between 0 and 999. This method is meant to be instantiated. The version included in this module will translate most of the numbers one might have to spell out to suit a style, as is commonly required when the number appears at the beginning of a sentence. Currently, only english is supported as an option. This number will be capitalized if the capitalize flag is set.
BUGS/CAVEATS/RESERVED METHODS
Reserves the _format_output method.
AUTHOR
Barry King <wyrd@nospam.wyrdwright.com>
SEE ALSO
LICENSE
Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd
.