I receive two strings: “from”=”12:30” and “to”=”14:30” which are two NSString objects.
I’d like to check if the current time is between the two received ones.
What’s the best way to do this?
Thanks.
I receive two strings: from=12:30 and to=14:30 which are two NSString objects. I’d like
Share
Get the hours/minutes components from the input date:
Then split the time string and compare the minutes and hours. Another way is to convert the strings to
NSDates and compare the dates.