CityRP Documentation Repository

cityrp.currency

Currency Library.

Functions

Sharedcityrp.currency.format(amount) → stringSource ☍

Formats a number into a currency string: comma-grouped, padded to the configured decimals, with the sign ahead of the symbol (-$1,234.50).

Parameters

  • amountstring|numberThe value to format; anything tonumber refuses formats as 0.

Returns

  1. stringThe formatted currency string.

Fields

Sharedcityrp.currencySource ☍