title: how to get the nearest decade/century/millenium with javascript
body: <p>im trying to find a way to get the 2 nearest ranges of a date could be decade , century, millenium</p>
  
  <p>Example</p>
  
  <pre><code>var date = new Date() // Mon Jul 09 2018 17:12:17 GMT-0400
  date.getDecadeRange() // [Jan 01 2010 , Dec 31 , 2019]
  </code></pre>
  
  <p>And so on. </p>