title: Can i compare these two dates in JS?
body: <pre><code>console.log("201905300545_201905300555"  &lt; "201905300535_201905300545")
  </code></pre>
  
  <p>I want to get if the first range of dates is more than the second range.</p>
  
  <p>UPD: I asked this question because my colleague compares dates like these in this very simple way. It works only when the dates are in this format (YYYY-MM-DD-HH-MM-SS) so JS compares them alphabetically.</p>