Skip to content

Instantly share code, notes, and snippets.

@mprokopov
Created March 17, 2021 08:34
Show Gist options
  • Select an option

  • Save mprokopov/7a2f08afe83aacb4836aa38a17ae977a to your computer and use it in GitHub Desktop.

Select an option

Save mprokopov/7a2f08afe83aacb4836aa38a17ae977a to your computer and use it in GitHub Desktop.
clojurescript render currency using google closure library
(import '[goog.i18n NumberFormat]
'[goog.i18n currency])
(let [fmt (NumberFormat. (.getLocalCurrencyPattern currency "USD"))]
(.format fmt 123.456)) ;; => "$123,46"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment