Skip to content

Commit

Permalink
I totally know how numbers work
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonpecora committed Jan 17, 2018
1 parent 8735c3b commit 50288f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers/numbers/addOrdinalSuffix.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function isSecond(num) {
return mod10(num) === 2 && mod100(num) !== 12;
}

function isFourth(num) {
function isThird(num) {
return mod10(num) === 3 && mod100(num) !== 13;
}

Expand All @@ -34,7 +34,7 @@ module.exports = function (num) {
return `${num}st`;
} else if (isSecond(num)) {
return `${num}nd`;
} else if (isFourth(num)) {
} else if (isThird(num)) {
return `${num}rd`;
} else {
return `${num}th`;
Expand Down

0 comments on commit 50288f4

Please sign in to comment.