I need to write a method that will check if Time.now is in between the open hours and the close hours of a shop.
Time.now
The open and close hours are saved as a Tim
You can strip the Time into its hours, minutes and seconds.
As described in Time Class:
t = Time.now hour = t.hour minute = t.min seconds = t.sec
Since you need to just compare whether it's within 2 hours you can check it as below.
if hour > openingHour and hour < closingHour