public static function clockStringToMs(clockStr:String):Number
Converts from clock string (hh:mm:ss.iii) to milliseconds
Parameters
| clockStr:String — clock string
|
Returns
| Number — milliseconds / NaN if not converted
|
public static function fillZeroes(src:String, len:uint):String
Fills zeroes before a number (as String) to match a length.
If string's length exceeds expected length, no zeroes are added and original string is returned
Parameters
| src:String — input string
|
|
| len:uint — length to match
|
Returns
| String — the processed string
|
public static function msToClockString(millis:Number):String
Converts from milliseconds value to clock string format (hh:mm:ss.iii)
Parameters
| millis:Number — milliseconds
|
Returns
| String — clock string format
|
public static function timeOffsetToMs(timeOffset:String):Number
Converts from time offset (hours, minutes, seconds, mlliseconds) to milliseconds
Parameters
| timeOffset:String — time offset (####h|m|s|ms or just bare number)
|
Returns
| Number — milliseconds / NaN if not converted
|
public static const CLOCK_REG:RegExp
public static const TIMEOFFSET_REG:RegExp
©2010 Tran Trong Thanh - trongthanh@gmail.com