Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toOrdinal returns incorrect results for some negative numbers (-11, -12, -13) #15

Closed
dmrzn opened this issue Jul 30, 2018 · 1 comment
Closed

Comments

@dmrzn
Copy link

dmrzn commented Jul 30, 2018

I've found the issue with negative numbers:

var numberToWords = require("number-to-words")
console.log(numberToWords.toOrdinal(-11))
console.log(numberToWords.toOrdinal(-12))
console.log(numberToWords.toOrdinal(-13))

returns:

-11st
-12nd
-13rd
@marlun78
Copy link
Owner

marlun78 commented Aug 9, 2018

Ouch! This needs fixing ASAP, thanks for the report @dmrzn!

marlun78 added a commit that referenced this issue Aug 9, 2018
marlun78 added a commit that referenced this issue Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants