title: how to compare hour in react native?
body: <p>I trying to compare an hour in react native, pasting some parameters; like a : current time, begin time an end time to open a mode screen, below is the follow code:</p>
  
  <pre><code>import React, { Component } from 'react';
  import moment from "moment";
  import SplashScreen from './Components/SplashScreen.js';
  import Intro from './Components/Menu.js';
  import Intro2 from './Components/Menu2.js';
  
  export default class Index extends Component {
  state = {
  ready: false,
  };
  componentDidMount() {
  var that = this;
  setTimeout(() =&gt; {
    this.setState({ ready: true });
  }, 3500);
  var currentD = new Date();
  var startIntroHourD = new Date();
  startIntroHourD.setHours(13,30,0); // 5.30 pm
  var endIntroHourD = new Date();
  endIntroHourD.setHours(5,30,0); // 5.30 am
  
  }
  
  render() {
   if (this.state.currentD &gt;= this.state.startIntroHourD &amp;&amp; this.state.currentD &lt;this.state.endIntroHourD ){
      if (this.state.ready === false) {
          return &lt;SplashScreen /&gt;;
        }
      return &lt;Intro/&gt;;
  }else{
      if (this.state.ready === false) {
        return &lt;SplashScreen /&gt;;
      }
    return &lt;Intro2/&gt;;
    }
   }
  }
  </code></pre>
  
  <p>But this parameters are not working, someone can help me to put the correct follow format time?</p>