Class: Money

Money

new tart.Money(amount, currency)

Tart Money Class for defining money type.

Name Type Description
amount number

Retrieves Amount for convert to currency.

currency tart.Currency optional

Currency type.

Methods

getAmount(){number}

Gets amount of Money.

Returns:
Type Description
number Returns full amount of money.

getCapital(){string}

Gets Capital of money.

Returns:
Type Description
string Returns capital of money.

getCurrency(){Object}

Gets object of currency.

Returns:
Type Description
Object Returns object of tart.Currency.

getFraction(){string}

Returns:
Type Description
string Returns fraction of money.

toArray(){Array}

Converts Money and Currency to Array.

Returns:
Type Description
Array Returns capital and fraction as array.

toCurrency(){string}

Gets tart.Currency.convert Method.

Returns:
Type Description
string Returns converted currency.

valueOf(){number}

Gets Value of Money.

Returns:
Type Description
number Returns full amount of money.