@quantlab/handsontable
Version:
Spreadsheet-like data grid editor that provides copy/paste functionality compatible with Excel/Google Docs
54 lines (51 loc) • 1.49 kB
JavaScript
/*!
* numbro.js language configuration
* language : English
* locale: New Zealand
* author : Benedikt Huss : https://github.com/ben305
*/
(function () {
'use strict';
var language = {
langLocaleCode: 'en-NZ',
cultureCode: 'en-NZ',
delimiters: {
thousands: ',',
decimal: '.'
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't'
},
ordinal: function (number) {
var b = number % 10;
return (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
},
currency: {
symbol: '$',
position: 'prefix'
},
defaults: {
currencyFormat: ',4 a'
},
formats: {
fourDigits: '4 a',
fullWithTwoDecimals: '$ ,0.00',
fullWithTwoDecimalsNoCurrency: ',0.00',
fullWithNoDecimals: '$ ,0'
}
};
// CommonJS
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && window.numbro && window.numbro.culture) {
window.numbro.culture(language.cultureCode, language);
}
}.call(typeof window === 'undefined' ? this : window));