Skip to content

Instantly share code, notes, and snippets.

@lukelex
Created August 17, 2012 14:57
Show Gist options
  • Select an option

  • Save lukelex/3379523 to your computer and use it in GitHub Desktop.

Select an option

Save lukelex/3379523 to your computer and use it in GitHub Desktop.
Converts brazilian money to american money
function money2float (money) {
money = money.replace(/[\.\s]/g, "")
money = money.replace(",",".");
return parseFloat(money);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment