Skip to content

Commit

Permalink
Merge pull request #104 from adamwdraper/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
adamwdraper committed Oct 30, 2013
2 parents 5b319b2 + 4d0be28 commit c3556ec
Show file tree
Hide file tree
Showing 24 changed files with 867 additions and 37 deletions.
6 changes: 5 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,17 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');

grunt.registerTask('default', [
'test'
]);

grunt.registerTask('test', [
'jshint',
'nodeunit'
]);

// P
grunt.registerTask('release', [
grunt.registerTask('build', [
'jshint',
'nodeunit',
'concat',
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Please submit all pull requests to the `develop` branch.

4. Add your tests to the files in `/tests`

5. To test your tests, run `grunt test`
5. To test your tests, run `grunt`

6. When all your tests are passing, run `grunt release` to minify all files
6. When all your tests are passing, run `grunt build` to minify all files

7. Submit a pull request.
7. Submit a pull request to the `develop` branch.


### Languages
Expand All @@ -42,6 +42,14 @@ See [the english unit tests](https://github.com/adamwdraper/Numeral-js/blob/mast

# Changelog

### 1.5.2

Bug fix: Unformat should pass through if given a number

Added a mechanism to control rounding behaviour

Added languageData() for getting and setting language props at runtime

### 1.5.1

Bug fix: Make sure values aren't changed during formatting
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "numeral",
"repo": "adamwdraper/Numeral-js",
"version": "1.5.1",
"version": "1.5.2",
"description": "Format and manipulate numbers.",
"keywords": [
"numeral",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "numeral",
"repo": "adamwdraper/Numeral-js",
"version": "1.5.1",
"version": "1.5.2",
"description": "Format and manipulate numbers.",
"keywords": [
"numeral",
Expand Down
138 changes: 138 additions & 0 deletions languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,40 @@
}
}());

/*!
* numeral.js language configuration
* language : french (Canada) (fr-CA)
* author : Léo Renaud-Allaire : https://github.com/renaudleo
*/
(function () {
var language = {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'k',
million: 'M',
billion: 'G',
trillion: 'T'
},
ordinal : function (number) {
return number === 1 ? 'er' : 'e';
},
currency: {
symbol: '$'
}
};

// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
this.numeral.language('fr-CA', language);
}
}());
/*!
* numeral.js language configuration
* language : french (fr-ch)
Expand Down Expand Up @@ -392,6 +426,40 @@
this.numeral.language('fr', language);
}
}());
/*!
* numeral.js language configuration
* language : Hungarian (hu)
* author : Peter Bakondy : https://github.com/pbakondy
*/
(function () {
var language = {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'E', // ezer
million: 'M', // millió
billion: 'Mrd', // milliárd
trillion: 'T' // trillió
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: ' Ft'
}
};

// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
this.numeral.language('hu', language);
}
}());
/*!
* numeral.js language configuration
* language : italian Italy (it)
Expand Down Expand Up @@ -461,6 +529,41 @@
}
}());

/*!
* numeral.js language configuration
* language : netherlands-dutch (nl-nl)
* author : Dave Clayton : https://github.com/davedx
*/
(function () {
var language = {
delimiters: {
thousands: '.',
decimal : ','
},
abbreviations: {
thousand : 'k',
million : 'mln',
billion : 'mrd',
trillion : 'bln'
},
ordinal : function (number) {
var remainder = number % 100;
return (number !== 0 && remainder <= 1 || remainder === 8 || remainder >= 20) ? 'ste' : 'de';
},
currency: {
symbol: '€ '
}
};

// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
this.numeral.language('nl-nl', language);
}
}());
/*!
* numeral.js language configuration
* language : polish (pl)
Expand Down Expand Up @@ -638,6 +741,41 @@
}
}());

/*!
* numeral.js language configuration
* language : slovak (sk)
* author : Ahmed Al Hafoudh : http://www.freevision.sk
*/
(function () {
var language = {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'tis.',
million: 'mil.',
billion: 'b',
trillion: 't'
},
ordinal: function () {
return '.';
},
currency: {
symbol: '€'
}
};

// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
this.numeral.language('sk', language);
}
}());

/*!
* numeral.js language configuration
* language : thai (th)
Expand Down
34 changes: 34 additions & 0 deletions languages/fr-CA.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*!
* numeral.js language configuration
* language : french (Canada) (fr-CA)
* author : Léo Renaud-Allaire : https://github.com/renaudleo
*/
(function () {
var language = {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'k',
million: 'M',
billion: 'G',
trillion: 'T'
},
ordinal : function (number) {
return number === 1 ? 'er' : 'e';
},
currency: {
symbol: '$'
}
};

// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
this.numeral.language('fr-CA', language);
}
}());
34 changes: 34 additions & 0 deletions languages/hu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*!
* numeral.js language configuration
* language : Hungarian (hu)
* author : Peter Bakondy : https://github.com/pbakondy
*/
(function () {
var language = {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'E', // ezer
million: 'M', // millió
billion: 'Mrd', // milliárd
trillion: 'T' // trillió
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: ' Ft'
}
};

// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
this.numeral.language('hu', language);
}
}());
35 changes: 35 additions & 0 deletions languages/nl-nl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*!
* numeral.js language configuration
* language : netherlands-dutch (nl-nl)
* author : Dave Clayton : https://github.com/davedx
*/
(function () {
var language = {
delimiters: {
thousands: '.',
decimal : ','
},
abbreviations: {
thousand : 'k',
million : 'mln',
billion : 'mrd',
trillion : 'bln'
},
ordinal : function (number) {
var remainder = number % 100;
return (number !== 0 && remainder <= 1 || remainder === 8 || remainder >= 20) ? 'ste' : 'de';
},
currency: {
symbol: '€ '
}
};

// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
this.numeral.language('nl-nl', language);
}
}());
34 changes: 34 additions & 0 deletions languages/sk.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*!
* numeral.js language configuration
* language : slovak (sk)
* author : Ahmed Al Hafoudh : http://www.freevision.sk
*/
(function () {
var language = {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'tis.',
million: 'mil.',
billion: 'b',
trillion: 't'
},
ordinal: function () {
return '.';
},
currency: {
symbol: '€'
}
};

// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = language;
}
// Browser
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
this.numeral.language('sk', language);
}
}());
Loading

0 comments on commit c3556ec

Please sign in to comment.