From: Loren C. <lor...@gm...> - 2010-07-15 17:39:09
|
I am in the process of adding the formatting of a number to a formatted string. There are three general purpose functions that format the number to a general number, currency or percentage according to the optionally specified locale. The fourth function takes in a format string according to the format specification for the java.text.DecimalFormat Java class. Please supply me with your comments. Dan will be developing XQuery unit tests to validate the functions. You will find the function docs below. Thank you, Loren number-to-currency-string util:number-to-currency-string($number as xs:double, $locale as xs:string?) xs:string? Returns a currency number formatted for the specified locale if specified (default otherwise) as an xs:string value. $number The number $locale two-letter ISO-639 code representing the locale Returns the formatted string number-to-formatted-string util:number-to-formatted-string($number as xs:double, $format as xs:string) xs:string? Returns the number formatted as an xs:string value. $number The number $format The format pattern string. Please see the JavaDoc for java.text.DecimalFormat to get the specifics of this format string. Returns the formatted string number-to-percent-string util:number-to-percent-string($number as xs:double, $locale as xs:string?) xs:string? Returns a percentage number formatted for the specified locale if specified (default otherwise) as an xs:string value. $number The number $locale two-letter ISO-639 code representing the locale Returns the formatted string number-to-string util:number-to-string($number as xs:double, $locale as xs:string?) xs:string? Returns a general-purpose number formatted for the specified locale if specified (default otherwise) as an xs:string value. $number The number $locale two-letter ISO-639 code representing the locale Returns the formatted string |