title: Select values between 2 values set with moment.js
body: <p>I'm working with moment.js in Angular 5.</p>
  
  <p>I have and array like this:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>public lineChartLabels: Array&lt;any&gt; = [  "2018/26/02 10:01:00", "2018/26/02 10:02:00", "2018/26/02 10:03:00", "2018/26/02 10:04:00", "2018/26/02 10:05:00", "2018/26/02 10:06:00", "2018/26/02 10:07:00", "2018/26/02 10:08:00", "2018/26/02 10:09:00", "2018/26/02 10:10:00", "2018/26/02 10:11:00", "2018/26/02 10:12:00","2018/26/02 10:13:00", "2018/26/02 10:14:00", "2018/26/02 10:15:00" ];
  </code></pre>
  
  <p>and I have <code>timeStart;</code> and <code>timeEnd;</code>. I report only first, I initialize both in the same way</p>
  
  <pre class="lang-js prettyprint-override"><code>let timeStart = moment();
  timeStart.format('YYYY/MM/DD HH:mm:ss');
  timeStart.year(2018);
  timeStart.month(2);
  timeStart.date(26);
  timeStart.hour(10);
  timeStart.minute(10);
  timeStart.second(0);
  </code></pre>
  
  <p>for <code>timeEnd</code> I use <code>timeStart.hour(10); timeStart.minute(13);</code></p>
  
  <p>Now I have to implement this cycle:</p>
  
  <pre class="lang-js prettyprint-override"><code>for( let i = 0; i &lt; this.lineChartLabels.length; i++ ){
    if (moment(this.lineChartsLabels[i]).isBetween(timeStart, timeEnd) ) {
      console.log ( 'true' );
    }
    else {
      console.log ( 'false' );
    }
  }
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>Do you know how can I resolve?</p>