Caplin Trader 5.1.0

Class: module:ct-element/formatter/SnapshotMaturityDateFormatter

module:ct-element/formatter/SnapshotMaturityDateFormatter()

new module:ct-element/formatter/SnapshotMaturityDateFormatter()

Formats a number into a string by adding date information.

It evaluates the number '0.5' to the string '6m' or the number '2' to '2 year'

Implements:

Methods

format(vValue) → {String}

Formats a number into a string by adding date information.

Parameters:
Name Type Description
vValue vValue

the number to format.

Implements:
Returns:

the number, formatted by adding 'm' for month values (values between 0 and 1) or ' year' for year values.

Type
String