Caplin Trader 4.8.0

Class: module:caplin/element/formatter/TimeFormatter

module:caplin/element/formatter/TimeFormatter

Constructor

new module:caplin/element/formatter/TimeFormatter()

Given a number with an even digit count as an input value, this will insert time separator characters as defined by the locale property ct.i18n.time.format.separator to give two digit groups. For example, given a ct.i18n.time.format.separator with a value of ':', the time 125644 would be formatted as follows: 125644 --> 12:56:44
Implements:

Methods

format(vValue) → {String}

Splits the input value into 2 digit groups.
Parameters:
Name Type Description
vValue String | Number the number.
Returns:
a new string split into time groups.
Type
String