开发者

Add number of days to a date and calculate the end date?

开发者 https://www.devze.com 2023-01-02 02:40 出处:网络
How can I calculate the number of days from a specific date?in other words add number of days to a date. I looked up NSCalendar and NSdate and could not find anything specific to tha开发者_StackOverfl

How can I calculate the number of days from a specific date?in other words add number of days to a date. I looked up NSCalendar and NSdate and could not find anything specific to tha开发者_StackOverflowt regards.


You can use -[NSCalendar components:fromDate:toDate:options:] to compare dates, or -[NSCalendar dateByAddingComponents:toDate:options:] to find a date that is a certain number of days from another date.

0

精彩评论

暂无评论...
验证码 换一张
取 消