title: How to validate year range in Javascript?
body: <p>I've got this regex to validate years:</p>
  
  <pre><code>/^(201[5-9]|202[0-5])/.test(year) ? true : false
  </code></pre>
  
  <p>As you can see years it has such pattern: <code>current_year + 10.years</code>, how to do it without hardcoding this way? I need something like this, but it's in Ruby: <code>valid_years = (Time.now.year..(Time.now.year+10))</code></p>