Caplin Trader 4.8.0

Class: module:caplin/element/formatter/SnapshotMaturityDateFormatter

module:caplin/element/formatter/SnapshotMaturityDateFormatter

Constructor

new module:caplin/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.
Returns:
the number, formatted by adding 'm' for month values (values between 0 and 1) or ' year' for year values.
Type
String