Last active
December 17, 2015 20:58
-
-
Save leocavalcante/5671054 to your computer and use it in GitHub Desktop.
number format API example
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
<!-- prefix : thousands : decimals : numdecimals : sufix --> | |
<!-- $ 1,234.567 --> | |
<input type="text" data-numformat="$ :comma:dot:3:"> | |
<!-- R$ 1.234,56 reais --> | |
<input type="text" data-numformat="R$ :dot:comma:2: reais"> | |
<!-- 1234.56 --> | |
<input type="text" data-numformat="::dot:2:"> | |
<!-- 1.234 --> | |
<input type="text" data-numformat=":dot:::"> |
Legal. Ficou interessante nesse ultimo jeito.
Também prefiro a ultima forma :D
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pensando melhor acho que até removeria o
k
,d
en
já que se vc definiu delimitador parathousands
provavelmente tbm precisa delimitar paradecimals
enumdecimals
tem que ser um numeral...