How do I create the current date (or any date) as an NSDate without hours, minutes and seconds?
问题 I need to create an NSDate of the current date (or on any NSDate) without the hours, minutes and seconds and keep it as an NSDate , in as few lines of as possible? I need to perform some calculations on dates and having hours, minutes and seconds cause problems, I need absolute dates (I hope absolute is the right phrase). Its for an iPhone app. I'm creating dates with [NSDate date] which add hours, minutes and seconds. Also I'm adding months to dates which I think caters for day light savings