Awee

currency

Currency converts a numeric value between currency units by applying a unit multiplier ratio.

Currency converts a numeric value between currency units by applying a unit multiplier ratio. Useful for converting between minor (cents) and major (dollars) units.

Input

int float string

Parameters

#TypeRequired
0intyes
1intyes

Returns

int

Examples

Convert dollars to cents

Input

price = 9

Template

{{ price | currency:1,100 }}

Output

900

Convert cents back to dollars

Input

cents = 1299

Template

{{ cents | currency:100,1 }}

Output

12

How is this guide?

On this page