title: validate string to JavaScript Date format
body: <p>I'm having trouble validating the following string which comes from the <code>new Date()</code> Object.
  <code>&quot;2020-10-06T14:23:43.964Z&quot;</code>. In my case, I'll be expecting either this input format or a <code>new Date()</code>. I'm trying to write something to do this similar to</p>
  <pre class="lang-js prettyprint-override"><code>const isValidDate = (d: Date):boolean =&gt; {
   if (d instanceof Date || /* check if valid Date string here */) {
     return true
   }
   return false
  }
  </code></pre>