Method Summary
-
fixFloat()
-
string
format(, , )
Formats the number for a certain pattern. The valid patterns are
-
string
formatDecimal()
Formats the decimal places.
-
string
formatInteger()
Formats the integer, perform groupings and string padding.
-
string
setPattern()
Sets the pattern to format against. The default patterns
-
sfNumberFormat
__construct()
Creates a new number format instance. The constructor can be instantiated
Method Details
-
-
(string) format (, , )
Browse code
Formats the number for a certain pattern. The valid patterns are
'c', 'd', 'e', 'p' or a custom pattern, such as "#.000" for
3 decimal places.
returns formatted number string
-
(string) formatDecimal ()
Browse code
Formats the decimal places.
returns formatted decimal places.
-
(string) formatInteger ()
Browse code
Formats the integer, perform groupings and string padding.
returns formatted integer string with grouping
-
(string) setPattern ()
Browse code
Sets the pattern to format against. The default patterns
are retrieved from the sfNumberFormatInfo instance.
returns a number format pattern.
-
(sfNumberFormat) __construct ()
Browse code
Creates a new number format instance. The constructor can be instantiated
with a string that represent a culture/locale. Similarly, passing
a sfCultureInfo or sfNumberFormatInfo instance will instantiated a instance
for that particular culture.
|