title: Determine if current time between multiple time spans
body: <p>I'm having trouble figuring out which tradings session any particular time is in.</p>
  
  <p>There are four possible sessions, show in this picture taken from ForexFactory.com</p>
  
  <p><img src="https://i.stack.imgur.com/VlK5O.png" alt="enter image description here"></p>
  
  <p>I have this method that I need to check is currentTime is during the specified trading session.</p>
  
  <pre><code>public bool IsTradingSession(TradingSession tradingSession, DateTime currentTime)
  {
      //currentTime is in local time.
  
  
      //Regular session is 5PM - next day 5PM, this is the session in the picture.
      //Irregular sessions also occur for example late open (3AM - same day 5PM)  or early close (5PM - next day 11AM)
      DateTime sessionStart = Exchange.ToLocalTime(Exchange.CurrentSessionOpen);
      DateTime sessionEnd = Exchange.ToLocalTime(Exchange.CurrentSessionClose);
  
      if(tradingSession == TradingSession.Sydney)
          return ....... ? true : false;
      if(tradingSession == TradingSession.Tokyo)
          return ....... ? true : false;        
      if(tradingSession == TradingSession.London)
          return ....... ? true : false;
      if (tradingSession == TradingSession.NewYork)
          return ....... ? true : false;
  
      return false;
  }
  </code></pre>
  
  <p>Use: </p>
  
  <pre><code>    bool isSydneySession = IsTradingSession(TradingSession.Sydney, CurrentTime);
      bool isTokyoSession = IsTradingSession(TradingSession.Tokyo, CurrentTime);
      bool isLondonSession = IsTradingSession(TradingSession.London, CurrentTime);
      bool isNewYorkSession = IsTradingSession(TradingSession.NewYork, CurrentTime);
  </code></pre>
  
  <p>Thank you</p>