Created
July 8, 2023 02:50
-
-
Save kironroy/4aea43343e49fb7edec938e0f35f4e38 to your computer and use it in GitHub Desktop.
function for formatting currency, time
This file contains 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
const formatCur = function (value, locale, currency) { | |
return new Intl.NumberFormat(locale, { | |
style: 'currency', | |
currency: currency, | |
}).format(value); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment