I raised strange issue:
var d = new Date("2016--01---01");
Would create object without any errors. Actually, first question is - why?
But then i need to get string from this object - i am trying to
d.toString();     // 'Invalid Date'
d.getTime();      // NaN
d.toJSON();       // null
What it is possible ways to get string or check that it is incorrect?
 
     
    