Closed khasburrahman closed 3 years ago
Thank you for taking the effort to submit a pull request, @khasburrahman.
I understand that _.isDate(new Date('invalid')) === true
is confusing. But the confusing part is that new Date('invalid')
returns an actual Date
. I think an explanation for that belongs on a web page about Date
, such as this one, instead of on a web page about Underscore. Would you agree with that?
@khasburrahman if you have not replied yet by June 30, I will close this PR for the time being. The PR can still be reopened after that if you wish. Thank you for understanding.
This additional info might be helpful for some people that doesn't aware that initializing Date with invalid date string will still returns a Date object. So that checking invalid Date with
isDate
will returns true._.isDate()
function only checks if a variable type isDate
not check if it the value is valid.