I have in the past used the below function to add on a specific time interval using NSDateComponents
to an existing date.
(NSDate *)dateByAddingComponents:(NSDateComponents *)comps
toDate:(NSDate *)date
options:(NSCalendarOptions)opts
From iOS8 the week value is deprecated for NSDateComponents
, which means I can't achieve what I want to do: generate a new NSDate
by adding a certain number of weeks to a given NSDate
.
Any help would be greatly appreciated.