isNaN test of dates in different way (v10)

Revision 10 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
parse
isNaN(Date.parse('2022-01-01'));
ready
valueOf
isNaN(new Date('2022-01-01').valueOf());
ready
Date
isNaN(new Date('2022-01-01'));
ready
Regex 1
/^\d{4}-\d{2}-\d{2}$/.test('2022-01-01')
ready
Regex 2
/^\d{1,2}[-/.]\d{1,2}[-/.]\d{4}$/.test('01/01/2022')
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.