|
Apache::Wyrd::Number - Format Numerals or Translate to Written
|
Apache::Wyrd::Number - Format Numerals or Translate to Written (English)
There are
<BASENAME::Number>
<BASENAME::Lookup query="select count(stones) from dancers" />
</BASENAME::Number>
stones in the dancers.
NONE
- 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
(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.
Reserves the _format_output method.
Barry King <wyrd@nospam.wyrdwright.com>
- Apache::Wyrd
-
General-purpose HTML-embeddable perl object
Copyright 2002-2004 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd.
|
Apache::Wyrd::Number - Format Numerals or Translate to Written
|