title: MomentJs isBetween() function is not returning expected result?
body: <p>I am using <code>momentjs</code> for fetching current time. Then I need to check is it between the specified range or not. Let me show what I have done. I am using <code>isBetween</code> function that is returning unexpected output.</p>
  
  <pre><code>var now = moment().tz("America/Edmonton").format('LT');
  var format = 'hh:mm:ss';
  var time = moment(now,format),
  beforeTime = moment(isha_adhan, format);
  afterTime = moment(fajr_adhan, format);
  console.log("time: ");
  console.log(time);
  console.log("beforeTime: ");
  console.log(beforeTime);
  console.log("afterTime:");
  console.log(afterTime);
  
  if (time.isBetween(beforeTime, afterTime)) {
      console.log('is between Isha and Fajr');
  } else {
      console.log('is not between Isha and Fajr');
  }
  </code></pre>
  
  <p>This always execute the else statement. Here is the console output.</p>
  
  <pre><code>time: 
  Moment {_isAMomentObject: true, _i: "5:06 AM", _f: "hh:mm:ss", _isUTC: false, _pf: {…}, …}
  beforeTime: 
  Moment {_isAMomentObject: true, _i: "6:05 PM", _f: "hh:mm:ss", _isUTC: false, _pf: {…}, …}
  afterTime:
  Moment {_isAMomentObject: true, _i: "6:33 AM", _f: "hh:mm:ss", _isUTC: false, _pf: {…}, …}
  is not between Isha and Fajr
  </code></pre>
  
  <p>Console output in image Please see here <a href="https://imgur.com/a/QarVaw2" rel="nofollow noreferrer">ScreenShot</a>.</p>