I'm playing around with sanitizing some bulk data and came across this:
numeral('2:23:57').value()
8637
numeral('hello').value()
null
isNaN(numeral('hello').value())
false
This contradicts the documentation here which asserts two things:
numeral('2:23:57') should be invalid, but it isn't. Not sure how it's coming up with a value of 8637. Could this be a bug?numeral('some invalid string').value() should equal NaN, but is instead null. This is a breaking issue because validating numerals using isNaN() no longer works!Yeah, in general, Numeral's behavior is a bit strange. For example,
numeral('11/22/17')
112217
it parses this kind of datestring as a valid number, but when you parse a full datestring
numeral(new Date().toString()).value()
NaN
you get NaN, as opposed to null? Very odd.
Same with 1-18, value comes up as -118.

example from docs is broken
numeral('2:23:57').value() returns 8637
Closing as this hasn't received any attention. I think Numeral is a great library and works well for the vast majority of use cases when you have formatted data intended to represent numbers.
@leosco what about this https://github.com/adamwdraper/Numeral-js/issues/581#issuecomment-395720712 maybe it worth to update the docs at least?
Most helpful comment
example from docs is broken
numeral('2:23:57').value()returns8637