Skip to content

Commit

Permalink
Do not use substr(-1) for IE8 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
ichernev committed Dec 31, 2015
1 parent 57e26cd commit 2015146
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/locale/gd.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default moment.defineLocale('gd', {
},
ordinalParse : /\d{1,2}(d|na|mh)/,
ordinal : function (number) {
var output = (number === 1) ? 'd' : (number.toString().substr(-1) === '2') ? 'na' : 'mh';
var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
return number + output;
},
week : {
Expand Down

0 comments on commit 2015146

Please sign in to comment.