Check out example codes for "check if current time is in the morning c#". It will help you in understanding the concepts better.
Code Example 1
TimeSpan time = DateTime.Now.TimeOfDay;
if (time > new TimeSpan(00, 00, 01) //Hours, Minutes, Seconds
&& time < new TimeSpan(08, 00, 00)) {
//match found
}
Learn ReactJs, React Native from akashmittal.com