Created
March 17, 2021 08:34
-
-
Save mprokopov/7a2f08afe83aacb4836aa38a17ae977a to your computer and use it in GitHub Desktop.
clojurescript render currency using google closure library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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