I am trying to implement a utility method to determine a given HH:MM lies between given startTime and endTime also in HH:MM form | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I am trying to implement a utility method to determine a given HH:MM lies between given startTime and endTime also in HH:MM form

Can anyone tell the logic to implement it. For instance if startTime = 19:00 and endTime is 07:00 from the next day. And given time is 23:55. So it should return true.

11th Feb 2021, 12:42 PM
Ajay Agrawal
Ajay Agrawal - avatar
3 Answers
+ 4
Ajay Agrawal I don't know what exactly you are looking for , but here is something i tried , https://code.sololearn.com/cHkz90wlNDZf/?ref=app
11th Feb 2021, 1:39 PM
Abhay
Abhay - avatar
+ 1
Thank you so much Abhay, you helped me a lot. It is almost same which I was trying to implement. 😃🥳
11th Feb 2021, 1:43 PM
Ajay Agrawal
Ajay Agrawal - avatar
+ 1
👌✌
11th Feb 2021, 1:51 PM
Abhay
Abhay - avatar