title: Custom time interval infinitely looping
body: <p>I'm trying to create a custom interval to render only the ticks I want in a d3 time scale. I can partially achieve this like so:</p>
  <pre><code>const customInterval = d3.timeMonth.filter(date =&gt; {
    return d3.timeMonth.count(0, date) % 2 === 0;
  });
  </code></pre>
  <p>I can then use this with my axis:</p>
  <pre><code>axis.ticks(customInterval)
  </code></pre>
  <p>In this case I'm rendering a tick every odd month. The problem comes when I want limit the ticks based on known date(s). For example, I may want to render ticks only after a date like 2020/03/01. So taking the same approach, I do something like:</p>
  <pre><code>const customInterval = d3.timeMonth.filter(date =&gt; {
    return date &gt; moment('2020/03/01', 'YYYY/MM/DD').toDate();
  });
  </code></pre>
  <p>The code above results in an infinite loop. In this case I'm using moment but the same behaviour can be observed without the use of moment.</p>
  <p>How can I filter out ticks with a custom interval based on specific times?</p>
  <p><em>Reproduction here: <a href="https://codepen.io/garethdn/pen/NWNYzgN" rel="nofollow noreferrer">https://codepen.io/garethdn/pen/NWNYzgN</a></em></p>