Open jyounus opened 8 years ago
isInTimeRange
is not currently in the v2 version. We should do something with time intervals alike the NSDateInterval
class. Needs further investigation.
What do you think @malcommac
@malcommac ?
I'm finishing TimePeriod class; I think we could add a shortcut to manage time-only interval in NSDate/DateInRegion which uses TimePeriod methods. I'll post updated later this week.
Scheduled for 4.2.0
Hey there,
I don't have time to create a PR right now, but thought I'd post my code here for you to update. The isInTimeRange function on line 639 isn't working properly.
Here's the modified version that works for me:
Basically I had to make sure that I create the new NSDate objects and set them to todays date. Your existing way was setting it to whatever the start date of the unix epoch time is again.
I can submit a PR over the next few days or so, unless you have time to just take the above code and maybe clean it up a bit yourself.
Thanks for the lib btw! :)