Checking between time range

I’m stuck on solving this.

On my database I have a field of start time and end time, some goes overnight so it would look like 20:00 – 05:00 and some are 01:00 – 13 :00

Are there any built in function on this on jquery?
I’ve been having problems with nested ifs on this one.