且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

解析检查对象是否是今天创建的?目标-C

更新时间:2023-11-26 20:05:04

查看 NSCalendarstartOfDayForDate 方法来查找当天的开始.

Check out NSCalendar's startOfDayForDate method to find the start of the current day.

要查找当天的结束时间,您需要在从 startOfDayForDate 返回的日期中添加一天,然后减去一秒.

To find the end of the current day, you'll want to add a day to the date returned from startOfDayForDate and then subtract one second.