Packagecom.cyntaxic.cyntils
Classpublic class CynFormat
InheritanceCynFormat Inheritance Object

The CynFormat class contains static functions for formatting.



Public Methods
 MethodDefined By
  
cash(number:Number, symbol:String = $, frontSymbol:Boolean = true, changeSplit:String = ., billsSplit:String = ,):String
[static] Converts a number into a cash string.
CynFormat
  
time(seconds:Number):String
[static] Converts seconds into formatted hours, minutes and seconds.
CynFormat
Method Detail
cash()method
public static function cash(number:Number, symbol:String = $, frontSymbol:Boolean = true, changeSplit:String = ., billsSplit:String = ,):String

Converts a number into a cash string.

Parameters

number:Number — The number to be converted.
 
symbol:String (default = $) — The currency symbol.
 
frontSymbol:Boolean (default = true) — Flag to use the currency symbol or not.
 
changeSplit:String (default = .) — The delimiter between dollars and cents.
 
billsSplit:String (default = ,) — The delimiter between thousands of dollars.

Returns
String — The cash string.
time()method 
public static function time(seconds:Number):String

Converts seconds into formatted hours, minutes and seconds.

Parameters

seconds:Number — The seconds to be converted.

Returns
String — The formatted hours, minutes and seconds string.