Determine if current local time is between two times (ignoring the date portion)

后端 未结 3 451
礼貌的吻别
礼貌的吻别 2021-01-06 05:59

Considering that there is no NSTime in Cocoa-Touch (Objective-C on iPhone), and given two times as NSStrings and a timezone as an NSString, how can you calculate whether or

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-06 06:01

    You should probably look at NSCalendar and NSDateComponents. I'm using them to do some date math for an iPhone app. I don't see a builtin method to do what you want directly, but you can figure it out by breaking it into pieces I expect?

提交回复
热议问题