Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Node.js CI

on:
- push

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test-ci
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ module.exports = function(grunt) {
]);
});

// Travis CI task.
grunt.registerTask('travis', [
// CI task.
grunt.registerTask('ci', [
'build',
'mochaTest',
'karma:ci'
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ See [the english unit tests](https://github.com/adamwdraper/Numeral-js/blob/mast

# Changelog

### 2.1.0

Added: Bosnian, Croatian, Romanian, Serbian locales

### 2.0.6

Bug fix: Multi letter currency symbols and spacing
Expand Down
88 changes: 88 additions & 0 deletions locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@
})();


(function() {
numeral.register('locale', 'bs', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/bs.html
thousand: 'hilj',
million: 'mil',
billion: 'mlr',
trillion: 'bil'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'KM'
}
});
})();


(function() {

numeral.register('locale', 'chs', {
Expand Down Expand Up @@ -398,6 +420,28 @@
})();


(function() {
numeral.register('locale', 'hr', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/hr.html
thousand: 'tis',
million: 'mil',
billion: 'mlr',
trillion: 'bil'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'kn'
}
});
})();


(function() {
numeral.register('locale', 'hu', {
delimiters: {
Expand Down Expand Up @@ -621,6 +665,28 @@
})();


(function() {
numeral.register('locale', 'ro', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/ro.html
thousand: 'K',
million: 'mil',
billion: 'mld',
trillion: 'tril'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'L'
}
});
})();


(function() {
numeral.register('locale', 'ru-ua', {
delimiters: {
Expand Down Expand Up @@ -715,6 +781,28 @@
})();


(function() {
numeral.register('locale', 'sr', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/sr.html
thousand: 'хиљ',
million: 'мил',
billion: 'млрд',
trillion: 'бил'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'DIN'
}
});
})();


(function() {


Expand Down
32 changes: 32 additions & 0 deletions locales/bs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : Bosnian
// author : David Sanda : https://github.com/dazix

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'bs', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/bs.html
thousand: 'hilj',
million: 'mil',
billion: 'mlr',
trillion: 'bil'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'KM'
}
});
}));
32 changes: 32 additions & 0 deletions locales/hr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : Croatian
// author : David Sanda : https://github.com/dazix

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'hr', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/hr.html
thousand: 'tis',
million: 'mil',
billion: 'mlr',
trillion: 'bil'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'kn'
}
});
}));
32 changes: 32 additions & 0 deletions locales/ro.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : Romanian
// author : David Sanda : https://github.com/dazix

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'ro', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/ro.html
thousand: 'K',
million: 'mil',
billion: 'mld',
trillion: 'tril'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'L'
}
});
}));
32 changes: 32 additions & 0 deletions locales/sr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : Serbian
// author : David Sanda : https://github.com/dazix

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'sr', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/sr.html
thousand: 'хиљ',
million: 'мил',
billion: 'млрд',
trillion: 'бил'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'DIN'
}
});
}));
Loading