title: Moment JS how to set is between and equal between 2 dates?
body: <p>Hi I would like to check if given date is between 2 dates with hours of course. So if we check if 13:00 is between 13:00 and 15:00 I would like to get true.</p>
  
  <p>I have this code:</p>
  
  <pre><code> let timeSlotStartTime = moment.utc(timeSlot.startTime);
      let startDayTime =  moment.utc(timeSlotStartTime.format('YYYY-MM-DD') + "T" + moment.utc(condition.parameters.timeFrom).format('HH:mm:00'));
      let endDayTime =  moment.utc(timeSlotStartTime.format('YYYY-MM-DD') + "T" + moment.utc(condition.parameters.timeTo).format('HH:mm:59'));
      return timeSlotStartTime.isBetween(startDayTime, endDayTime);
  </code></pre>
  
  <p>So I am checking if it is between but it works weird.</p>
  
  <p>If I set hours of startDayTime = 14:59 and endDayTime = 17:00
  and timeSlotStartTime is 14:15 it stills gives me true.(this is the bigger problem)</p>
  
  <p>and if timeSlotStartTime = 17:00 gives me false (which I want to give me true)</p>
  
  <p>Is there any possibility I can check between and equal within 2 moments?</p>
  
  <p>thanks</p>