numformat.js
Version:
number, decimal, integer, money and currency formatting library, with two way custom format/unformat symbols and patterns
32 lines • 787 B
JavaScript
nf.loadLanguage('it', {
integer: {
decimalPlaces: 0, //%d
decimalSeparator: ',', //%s
thousandSeparator: ' ',
currencySymbol: '', //%c
negativeSymbol: '-', //%n
pattern: '%n%i%s%d%c',
emptyValue : '',
toFixed: true
},
number: {
decimalPlaces: 2,
decimalSeparator: ',',
thousandSeparator: ' ',
currencySymbol: '',
negativeSymbol: '-',
pattern: '%n%i%s%d%c',
emptyValue : '',
toFixed: true
},
currency: {
decimalPlaces: 2,
decimalSeparator: ',',
thousandSeparator: ' ',
currencySymbol: '€',
negativeSymbol: '-',
pattern: '%n%i%s%d%c',
emptyValue : '',
toFixed: true
}
});